in reply to Re: Re: Killing a Forked Subprocess
in thread Killing a Forked Subprocess
Wouldn't the symbolic name be 'TERM', not 'SIGTERM' ? And also, since you're sending the signal to a process group, don't you need to give it a negative signal value?
=item kill LIST Sends a signal to a list of processes. The first element of the list must be the signal to send. Returns the number of processes successfully signaled. $cnt = kill 1, $child1, $child2; kill 9, @goners; Unlike in the shell, in Perl if the I<SIGNAL> is negative, it kills process groups instead of processes. (On System V, a negative I<PROCE +SS> number will also kill process groups, but that's not portable.) That means you usually want to use positive not negative signals. You may +also use a signal name in quotes. See L<perlipc/"Signals"> for details.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(x4): Killing a Forked Subprocess
by IlyaM (Parson) on Mar 21, 2002 at 20:44 UTC |