Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed possible race condition
  • Loading branch information
kraih committed Jan 16, 2015
1 parent a87e2ff commit e912853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Morbo.pm
Expand Up @@ -32,7 +32,7 @@ sub run {
my ($self, $app) = @_;

# Clean manager environment
local $SIG{CHLD} = sub { $self->_reap };
local $SIG{CHLD} = sub { $self->_reap if $self->{worker} };
local $SIG{INT} = local $SIG{TERM} = local $SIG{QUIT} = sub {
$self->{finished} = 1;
kill 'TERM', $self->{worker} if $self->{worker};
Expand Down

0 comments on commit e912853

Please sign in to comment.