0

Can anyone help me with this code problem using the C language

Write a program that will create a child process. Have the parent print out its pid and that of its child. Have the child print its pid and that of its parent. Recall that a process can obtain its own pid and that of its parent using the getpid( ) and getppid( ) system calls respectively. Have the processes print informational messages during various phases of their execution as a means of tracing them. A typical printout might contain the following output (not necessarily in this order). Immediately before the fork. Only one process at this point. Immediately after the fork. This statement should print twice. Immediately after the fork. This statement should print twice. I'm the child. My pid is XXXX. My parent's pid is XXXX. I'm the parent. My pid is XXXX. My child's PID is XXXX.

1st May 2021, 6:20 PM
nkululeko
2 odpowiedzi
+ 3
Seems to be your homework anyways post what you have tried
1st May 2021, 6:49 PM
Atul [Inactive]
+ 1
And specify the language too
1st May 2021, 6:49 PM
Atul [Inactive]