小弟學緊Operating System & System Programming
我係C的的初哥,應該話完全唔識,以下的要求,應該點寫.... 用C language under Unix:
Write a program under Unix with the following characteristics.
A parent process creates two children processes.
The first child process will sleep 1 second.
The second child process will sleep 10 seconds.
The parent waits for the first child to complete, and kills the second child when thefirst one completes.
After that, the parent writes: “Process X has waited forProcess Y to complete and killed Process Z.”
(where X is the process id of the parent, and Y and Z are the process ids of these two children).
Finally, the parent exits.
Please also provide necessary comments.