The parent process could store all PIDs of its children, and every time a child terminates, it would remove the respective PID from that set in the SIGCHLD handler (waitpid returns the PID of the deceased process). When the set is empty, all immediately forked processes are gone.
In reply to Re: How the parent process knows that all its child process has finished execution?
by almut
in thread How the parent process knows that all its child process has finished execution?
by kishore036
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |