Assuming you spawned the subprocesses via fork() (and remembered their pids), then have the parent process wait(). When one of the subprocesses dies dies, wait() will return the dead process's pid to the parent, who can spawn a new subprocess.
In reply to Re: Best way to ensure process is live
by dws
in thread Best way to ensure process is live
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |