Fixed to avoid use of smartmatch (damn you 5.18)
This commit is contained in:
parent
d323829b69
commit
b5a69ccf89
@ -174,12 +174,13 @@ sub running {
|
|||||||
my $signalled = kill 0,$pid;
|
my $signalled = kill 0,$pid;
|
||||||
$signalled ||= $!; # will either be 1 or an error code
|
$signalled ||= $!; # will either be 1 or an error code
|
||||||
|
|
||||||
given($signalled) {
|
# process signalled successfully
|
||||||
# process signalled successfully
|
if($signalled == 1) {
|
||||||
when(1) { return $pid; }
|
return $pid;
|
||||||
|
|
||||||
# exists, but no permissions to signal it
|
# exists, but no permissions to signal it
|
||||||
when(EPERM) { return -1 * $pid }
|
} elsif($signalled == EPERM) {
|
||||||
|
return -1 * $pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user