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.
| [reply] [d/l] |
Wouldn't the symbolic name be 'TERM', not 'SIGTERM'?
I've just tested it. Actually both of them work. At least on perl 5.6.1.
And also, since you're sending the signal to a process group, don't you need to give it a negative signal value?
Oops. I'm sorry, I missed that. I don't know if it is allowed to write
kill '-SIGHUP', .... If not still constants from POSIX.pm can be used instead of numbers:
use POSIX qw(SIGHUP);
kill -(SIGHUP), ....;
--
Ilya Martynov
(http://martynov.org/)
| [reply] [d/l] [select] |