Remove un-necessary variable.

This commit is contained in:
Matt Koscica 2013-08-21 21:06:46 +02:00
parent 926b547ada
commit 63ffb672dc

View file

@ -428,8 +428,6 @@ sub do_stop {
# Probably don't want to send anything to init(1). # Probably don't want to send anything to init(1).
return unless $start_pid > 1; return unless $start_pid > 1;
my $current_pid = $self->read_pid;
if ( $self->pid_running($start_pid) ) { if ( $self->pid_running($start_pid) ) {
SIGNAL: SIGNAL:
foreach my $signal ( qw(TERM TERM INT KILL) ) { foreach my $signal ( qw(TERM TERM INT KILL) ) {
@ -441,8 +439,7 @@ sub do_stop {
# abort early if the process is now stopped # abort early if the process is now stopped
$self->trace("checking if pid $start_pid is still running..."); $self->trace("checking if pid $start_pid is still running...");
last if not $self->pid_running($start_pid); last if not $self->pid_running($start_pid);
$current_pid = $self->read_pid; last if $self->read_pid != $start_pid;
last if $current_pid != $start_pid;
sleep 1; sleep 1;
} }
last unless $self->pid_running($start_pid); last unless $self->pid_running($start_pid);
@ -460,7 +457,7 @@ sub do_stop {
# it doesn't match what we started with. # it doesn't match what we started with.
if ( $self->pid_file ) { if ( $self->pid_file ) {
unlink($self->pid_file) if $current_pid == $start_pid; unlink($self->pid_file) if $self->read_pid == $start_pid;
} }
} }