Skip Menu |

This queue is for tickets about the Proc-ProcessTable CPAN distribution.

Report information
The Basics
Id: 14837
Status: new
Priority: 0/
Queue: Proc-ProcessTable

People
Owner: Nobody in particular
Requestors: reini.urban [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.40
Fixed in: (no value)



Subject: killall on cygwin with fname
Attached patch uses killall fname if cmndline is not defined (cygwin)
2005-09-29 22:29:40 rurban@cpan.org * Killall.pm (killall): killall on cygwin with fname --- Proc-ProcessTable-0.40/Killall.pm.orig 2003-05-19 16:34:55.000000000 +0000 +++ Proc-ProcessTable-0.40/Killall.pm 2005-09-29 20:28:16.338875000 +0000 @@ -39,7 +39,7 @@ } } -# usage: killall(singal, pattern) +# usage: killall(signal, pattern) # return: number of procs killed sub killall { croak("Usage: killall(signal, pattern)") unless @_==2; @@ -52,7 +52,8 @@ my $t = new Proc::ProcessTable; my $BANG = undef; foreach my $p (@{$t->table}) { - if ($p->cmndline =~ /$pat/) { + my $cmndline = $p->{cmndline} || $p->{fname}; + if ($cmndline =~ /$pat/) { next unless $p->pid != $$ || $self; if (kill $signal, $p->pid) { $nkilled++;