Skip to content

Commit

Permalink
fix typo in prefork test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 30, 2015
1 parent 774c03e commit bb00095
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -80,12 +80,12 @@ sub run {
$self->{poll}->mask($self->{reader}, POLLIN | POLLPRI);

# Clean manager environment
local $SIG{INT} = local $SIG{TERM} = sub { $self->_term };
local $SIG{CHLD} = sub {
while ((my $pid = waitpid -1, WNOHANG) > 0) {
$self->emit(reap => $pid)->_stopped($pid);
}
};
local $SIG{INT} = local $SIG{TERM} = sub { $self->_term };
local $SIG{QUIT} = sub { $self->_term(1) };
local $SIG{TTIN} = sub { $self->workers($self->workers + 1) };
local $SIG{TTOU} = sub {
Expand Down Expand Up @@ -189,7 +189,7 @@ sub _spawn {
$loop->recurring($self->heartbeat_interval => $cb);

# Clean worker environment
$SIG{$_} = 'DEFAULT' for qw(INT TERM CHLD TTIN TTOU);
$SIG{$_} = 'DEFAULT' for qw(CHLD INT TERM TTIN TTOU);
$SIG{QUIT} = sub { $loop->max_connections(0) };
delete @$self{qw(poll reader)};
srand;
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/prefork.t
Expand Up @@ -98,7 +98,7 @@ $prefork->on(
$tx->resume;
}
);
my $count = $tx = $graceful, undef;
my $count = $tx = $graceful = undef;
@spawn = @reap = ();
$prefork->on(spawn => sub { push @spawn, pop });
$prefork->once(
Expand Down

0 comments on commit bb00095

Please sign in to comment.