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]
2 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]2 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
What is the best way to pay for college?
Virty [35]

Answer:

I think it would be Federal student loans if I am sure sorry if you get it wrong.

Explanation:

3 0
2 years ago
Read 2 more answers
You would like to set up on online meeting to communicate with colleagues on a group project. Which of these tools should you su
Elenna [48]
WebEx :))))))))))))))))))))))
8 0
3 years ago
Read 2 more answers
The _____ feature automatically corrects typing, spelling, capitalization, or grammar errors as you type them.
Snezhnost [94]
Autocorrect is the answer
6 0
3 years ago
Which statement is true?
Klio2033 [76]

Answer:

You need to import the deque methods in order to use a deque.

Explanation:

the correct option is B

You need to import the deque methods in order to use a deque.

Please mark me as brainliest

5 0
2 years ago
Read 2 more answers
Why am I constantly getting bombarded with brainly plus ads and how to fix this without paying for it?
Helga [31]

Answer:

there really is no way to fix it. I've tried everything everybody says sorry

8 0
3 years ago
Read 2 more answers
Other questions:
  • 5. Are you more honest in your online communication? Explain your response.
    6·1 answer
  • Write a statement that reads 5 successive integers into these variables that have already been declared : x1 x2x3x4 x5. Then wri
    7·1 answer
  • Write a program that reads a list of scores and then assigns grades python
    9·1 answer
  • dentify the type of observational study​ (cross-sectional, retrospective, or​ prospective) described below. A research company u
    5·1 answer
  • What are the benefits of using a multiview sketch?
    11·1 answer
  • Which of the following is NOT a strength of monetary policy?
    15·1 answer
  • write the program or pseudocode algorithm that computes the product and average of three integers and display the results​
    7·1 answer
  • Help101111 avatar can we be friend's please? My name is Keegan. what is yours?
    12·1 answer
  • The computer stores currently used programs and data in ________.
    9·2 answers
  • Most case fans have standard _______________ connectors that are easy to plug in but can be forced to be connected the wrong way
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!