Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us | -->
Your current position : Homepage > Free Software > Technological exchanges >Application Programming -->


    

Blue Forest http://www.lslnet.com at 2:08 p.m. on August 16, 2006

Wait a number of doubts about the process


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?




Re : wait a number of doubts about the process

If the wait is not put there in the elements for the implementation of the process!




 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com