Question: 1 . 1 . Write a program which displays the parent's process Id and its process Id . Source code ( 2 Marks ) Output
Write a program which displays the parent's process Id and its process Id
Source code Marks
Output screenshot
Create a child process by using fork system call in which the parent displays a message that it has created a child process and also displays its childs process id
Source code Marks
Output screenshot
Child should display a message that I will execute cat command after seconds and go to sleep for sec Next it should display message that I am executing cat command
Source code Marks
Output screenshot
Use execl system call to execute cat commands.
Source code
Output screenshot
Finally, control should return to parent and Parent should display My Child is dead
Source code Marks
Output screenshot
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
