Hi I am new to this form and I was wondering If somebody can help me with a question I have and here it is:
Write a C program to create 20 child processes for only one parent process.
The output should include:-
A- Each child process print the child number (simple counter), child pid and the parent pid.
B- The parent process prints its pid and the list of its 20 children pids (only once after all children processes get terminated properly).
note: Make sure no zombie processes are active
I wrote a c program but I don't understand why I get the output in this way (shouldn't each child have a different pid):