Question: c language . Write a program that creates a child process. The child and parent processes have the following roles: The child process reads an
. Write a program that creates a child process. The child and parent processes have the following roles: The child process reads an integer value from the keyboard, and returns it as the exit status of the program, either with a return statement in the main function, or with an invocation to function exit. The parent process waits for the child process to finish, and prints the child's exit status on the screen, which should be equal to the value read from the keyboard. Read the man pages for function wait to see the details on how to capture the child's exit status, This is an example of the program output: s /93 Enter a number: 34 child exited with status 34 printed by child printed by parent
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
