Skip to content

Commit

Permalink
Use the recurring waitpid event to reap slow kids.
Browse files Browse the repository at this point in the history
  • Loading branch information
knox1000 committed May 27, 2016
1 parent 7eca83c commit 0b594d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Mojolicious/Plugin/CGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ sub _run {
while $args->{pids}{$pid}
and kill 0, $pid
and $GUARD--;
$defaults->{pids}{$pid} = $args->{pids}{$pid} if kill 0, $pid;
return $c->finish if $c->res->code;
return $c->render(text => "Could not run CGI script ($?, $!).\n", status => 500);
},
Expand Down

0 comments on commit 0b594d8

Please sign in to comment.