Program to create four processes (1 parent and 3 children) where they terminates in a sequence as follows :
(a) Parent process terminates at last
(b) First child terminates before parent and after second child.
(c) Second child terminates after last and before first child.
(d) Third child terminates first.
Prerequisite : fork(),
child-->pid=50 and ppid=47 child-->pid=49 and ppid=47 child-->pid=48 and ppid=47 parent-->pid=47
This code runs on Linux platform.
- Create n-child process from same parent process using fork() in C
- Pass the value from child process to parent process
- Zombie Processes and their Prevention
- Chat application between two processes using signals and shared memory
- Program to show that Linux provides time sharing environment to processes
- Exit status of a child process in Linux
- Fork() Bomb
- Fork() - Practice questions
- C program for Time Complexity plot of Bubble, Insertion and Selection Sort using Gnuplot
- Finding the Frobenius Norm of a given matrix
- C program to check if a given year is leap year using Conditional operator
- Introduction to Linux Operating System
- Julia Fractal set in C/C++ Using Graphics
- How to Install Ulauncher in Ubuntu?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.