sonalig has asked for the wisdom of the Perl Monks concerning the following question:
I can use the modules or can do ps -ef > file and parse the file to getthe child pids and kill them. I don't want to use modules. Is there some other way of doing the above? Thanksfor loop { $pid=fork; exec (command); } if ($pid > 0) { # I am in the parent process kill child pid; # How to do for multiple child processes? }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to get pid for multiple child process in parent process
by pc88mxer (Vicar) on Jul 01, 2008 at 00:05 UTC | |
|
Re: how to get pid for multiple child process in parent process
by Fletch (Bishop) on Jul 01, 2008 at 00:06 UTC | |
|
Re: how to get pid for multiple child process in parent process
by thezip (Vicar) on Jul 01, 2008 at 00:11 UTC |