I did something similar a while ago at Timing and timing out Unix commands -- this node includes a complete example Unix program that does something very similar to what you describe.
In reply to Re: forking, waiting, and killing child pids
by eyepopslikeamosquito
in thread forking, waiting, and killing child pids
by sinmissing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |