Question: 2. Write a C program to illustrate the concept of orphan process. Parent process creates a child and terminates before child has finished its
2. Write a C program to illustrate the concept of orphan process. Parent process creates a child and terminates before child has finished its task. So child process becomes orphan process. The output should be similar to the following image. Note that when you run your code the processes IDs will be different than the image given below). (you can use fork(), sleep(), getpid(), getppid()). I am the parent with PID 5372 and PPID 5371. My child's PID is 5373 PID 5372 terminates. I'm the child with PID 5373 and PPID 1. PID 5373 terminates.
Step by Step Solution
3.50 Rating (157 Votes )
There are 3 Steps involved in it
The question is asking to write a C program that illustrates the concept of an orphan process An orphan process is a computer process whose parent pro... View full answer
Get step-by-step solutions from verified subject matter experts
