Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- pid_t zaklad;
- if ((zaklad = fork()) >=0) //successful fork
- {
- if ((zaklad = fork()) ==0) //child process
- {
- printf("This is child process \n");
- }
- if ((zaklad = fork()) >0)
- {
- printf("This is parent process \n");
- }
- }
- else //fork failed
- {
- fprintf (stderr,"fork error\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement