Question: Write a C program that creates a child process that prints out its pid and new line and then calls pause ( ) system call.
Write a C program that creates a child process that prints out its pid and new line and
then calls pause system call. Once it returns from the pause system call the child
program must exit with exit code The parent program must wait for the child process
and print out the pid of the child process and the exit status with the following format:
childpiddexitstatusd
Do not print anything else to stdout.
Hint: make sure that the child handles SIGINT signal. Make sure that the exit code of the
child process is and not any other number.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
