Question: Home work # 3 5 0 points This homework focuses on learning how to create processes in Linux / Unix . Using Fork (
Home work #
points
This homework focuses on learning how to create processes in LinuxUnix
Using Fork and Exec create five child processes. Load the "Hello" program in each process after creation. Each child program should print its own PID or some other parameters distinguishing its execution. Use getpid to print process ID in each process.
Each process should run and return to the parent process where the parent is waiting to terminate. The parent should only terminate after all children returned from execution.
Run your program, capture its output, and create a single PDF file with source code and its output and submit it on the Blackboard. The code should be written in C
Hint: Using the sample program in the book; first make it run for one fork Once it works and tested, then write a loop to create four child processes. You may need small modifications to run the code in the textbook.
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
