Establish procedures to achieve the 10 subsystems : code, which no one subroutine WAIT
……
For (i=0; i<10;i++) (
If (fork () ==0) ( Printf ( "fils %d Id =%d ", i, getpid ()); Exit (2); }
}
Pid =wait (&status); If (WIFEXITED (status)) ( Printf ( "PERE:fils %d termine, %d\n status :" pid, WEXITSTATUS (status)); Return EXIT_SUCCESS;
The procedure can accomplish the mission, if the above procedure may be why WAIT () FOR sentences moved to the top circle inside next to the exit (2) behind only output
Fils2:pid=2343 PERE:fils 2 termine status:2
Why not build the remaining nine subroutine output?
|