Skip to content

Commit

Permalink
delay setting $0 in master. Fixes gh-7
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Apr 20, 2010
1 parent 1cf8daf commit 69a6600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Starman/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ sub pre_loop_hook {
TTIN => sub { $self->{server}->{$_}++ for qw( min_servers max_servers ) },
TTOU => sub { $self->{server}->{$_}-- for qw( min_servers max_servers ) },
);
}

sub run_parent {
my $self = shift;
$0 = "starman master " . join(" ", @{$self->{options}{argv} || []});
$self->SUPER::run_parent(@_);
}

# The below methods run in the child process
Expand Down

0 comments on commit 69a6600

Please sign in to comment.