Question: Create a program that forks a child process, where the parent prints the childs process ID. Use top to show the PID and PPID (parent
Create a program that forks a child process, where the parent prints the childs process ID. Use top to show the PID and PPID (parent process ID). Note that you will need to have each process run long enough to allow you to capture the top output. To add the PPID column: (a) use SHIFT-F to open the Fields Management screen, (b) cursor down to the PPID field, press the SPACE bar to select it, and press ESC to return. You may modify any of the sample programs provided with the lecture notes. Provide (i) your program, (ii) program output, and (iii) the top output, including the PPID as explained above. In your report, describe what you see for your processes PIDs and PPIDs.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
