Skip to content

Instantly share code, notes, and snippets.

@bhavul
Last active June 18, 2017 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhavul/1e1ba48f02b9440fd15a1e7a102f0c50 to your computer and use it in GitHub Desktop.
Save bhavul/1e1ba48f02b9440fd15a1e7a102f0c50 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
if(fork()) //1st child p2 created
{
if(fork()) //2nd child p3 created
{
fork(); //3rd child p4 created
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment