Skip to content

Commit d4e1261

Browse files
author
Jan Henning Thorsen
committed
Fix bash not setting "stop" flag
1 parent 1d85efb commit d4e1261

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

lib/Mojo/IOLoop/ReadWriteFork.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ sub _setup_recurring_child_alive_check {
227227
my $obj = $reactor->{forks}{$pid} || {};
228228

229229
if(waitpid($pid, WNOHANG) <= 0) {
230-
$obj->{stop} or next;
231230
# NOTE: cannot use kill() to check if the process is alive, since
232231
# the process might be owned by another user.
233232
-d "/proc/$pid" and next;

t/bash.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ plan tests => 4;
3838
}
3939

4040
is $run->pid, 0, 'no pid' or diag $run->pid;
41+
Mojo::IOLoop->timer(3 => sub { Mojo::IOLoop->stop }); # guard
4142
Mojo::IOLoop->start;
4243
like $run->pid, qr{^[1-9]\d+$}, 'got pid' or diag $run->pid;
4344
like $output, qr/^too cool foo bar baz\W{1,2}$/, 'got stdout from "echo"' or diag $output;

t/cat.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ plan tests => 10;
4040
memory_cycle_ok $run, 'no cycle after start()';
4141
is $run->pid, 0, 'no pid' or diag $run->pid;
4242
Mojo::IOLoop->timer(0.1, sub { $run->write("hello world\n\x04") });
43+
Mojo::IOLoop->timer(3 => sub { Mojo::IOLoop->stop }); # guard
4344
Mojo::IOLoop->start;
4445
memory_cycle_ok $run, 'no cycle after Mojo::IOLoop->start';
4546

0 commit comments

Comments
 (0)