Skip to content

Commit a0468f5

Browse files
authored
Merge pull request #62 from Martchus/process-group-handling-2
Fix race condition in `is_running` when `kill_whole_group` is set
2 parents 0051f50 + c4c7930 commit a0468f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Mojo/IOLoop/ReadWriteProcess.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ sub is_running {
404404
my ($self) = shift;
405405
$self->session->consume_collected_info;
406406
return 0 unless my $pid = $self->process_id;
407-
kill(0, ($self->kill_whole_group ? -$pid : $pid));
407+
kill(0, ($self->kill_whole_group ? (-$pid, $pid) : ($pid)));
408408
}
409409

410410
sub write_pidfile {

0 commit comments

Comments
 (0)