1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marrrta [24]
3 years ago
8

Using either a UNIX or a Linux system, write a C program that forks a child process that ultimately becomes a zombie process. Th

is zombie process must remain in the system for at least 10 seconds.
Computers and Technology
1 answer:
tankabanditka [31]3 years ago
5 0

Answer:

#include <stdlib.h>

#include <sys/types.h>

#include <unistd.h>

int main()

{

// Using fork() creates child process which is  identical to parent

int pid = fork();

 // Creating the Parent process

if (pid > 0)

 sleep(10);

// And then the Child process

else

{

 exit(0);

}

 

return 0;

}

Explanation:

Using a Text editor enter the code in the Answer section and save it as zombie.c. The created process will be able to run for 10 seconds.

Now open the Terminal and type $ cc zombie.c -o zombie to compile the program which is then saved as an executable file.

With a GNU compiler run the following command ./zombie which will give you an output of the parent process and child process to be used testing.

You might be interested in
Once a software program has been through one test cycle performed by the programmers and is running proper
Lera25 [3.4K]
Yes, some may also say that they release it to the beta testers.

Occasionally, they release it to alpha testers before beta testers as another step.
8 0
4 years ago
What is the purpose of the domain name?
Aloiza [94]

Answer:

Purpose. Domain names serve to identify Internet resources, such as computers, networks, and services, with a text-based label that is easier to memorize than the numerical addresses used in the Internet protocols.

6 0
3 years ago
Using e-mail has decreased the number of hand-written letters that people send to their friends and relatives. this is a ____ fu
k0ka [10]
Hello <span>Alexkalhor5415

</span>Answer: Using e-mail has made it easy, fast, and inexpensive for family members who live in different parts of the united states to keep in touch. this is a positive  function of e-mail.
Hope this helps-Chris
6 0
3 years ago
Draw the 2-3 tree that results when you insert the keys E A S Y Q U T I O N in that order into an initially empty tree
mr_godi [17]

Answer:

If its any easy question, answer it yourself.

Explanation:

:)

6 0
2 years ago
Answer if you play PS4 apex legends if you do answer username and first to answer is brainliest
Vinil7 [7]

Answer:

I do not, sorry

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • A file that contains program code is called a ____________.
    13·1 answer
  • It is essential that a security professional is able to resolve and respond to cyber law inquiries and incidents while avoiding
    14·1 answer
  • In your own words, explain the role of scientific investigation in the development of the Theory of Evolution.
    6·1 answer
  • Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the S
    6·1 answer
  • What can search the Internet and select elements based on important words?
    6·2 answers
  • Which attribute of the image tag specifies the URL of an image
    14·1 answer
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • Identify a factor that is unlikely to influence the length of time people wait in the lunch line.
    8·2 answers
  • What do Business Analysis workers do? Check all that apply.
    15·2 answers
  • What are the fundamental activities that are common to all software processes?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!