[LCP]wait, waitpid - help
redindian at nettaxi.com
Wed Feb 20 15:39:09 UTC 2002
the following is a handler for SIGCHLD signal in a program.
this function was written to prevent zombies and to terminate the
child by catching the SIGCHLD.
printf("child %d terminated \n",pid);
now, i want to know what happens when " pid=wait(&stat) " statement
executes. how the child terminates (without becoming a zombie) . what is
the significance of "&stat ".
also in case of waitpid(-1,&stat, WNOHNG) --what happens here
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linuxCprogramming