Question: 1. Write a C Program to create a child process using fork() system call, display parent and child process id. Parent process should wait

  
1. Write a C Program to create a child process using fork() system call, display parent and child process id.

1. Write a C Program to create a child process using fork() system call, display parent and child process id. Parent process should wait for child to terminate. The output should be similar to the following image where each process should print its ID and its parent ID. Note that when you run your code the processes IDS will be different than the image given below] I am the child process and pid is: 1706 and ppid is: 1705. I am the parent process and pid is: 1705 and ppid is: 1704.

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

You are asked to write a C program which uses the fork system call to create a child process The par... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!