From: Daniel Kahn Gillmor Date: Wed, 27 Oct 2010 03:18:52 +0000 (-0400) Subject: avoid re-setting the exit code after waiting for upgrade monitoring process to terminate X-Git-Tag: msva-perl_debian/0.6-1~3^2~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0c2e32f392227c20bff140ce771a6f3be336a765;p=monkeysphere-validation-agent.git avoid re-setting the exit code after waiting for upgrade monitoring process to terminate --- diff --git a/Crypt/Monkeysphere/MSVA/Monitor.pm b/Crypt/Monkeysphere/MSVA/Monitor.pm index aad42b7..237e55b 100644 --- a/Crypt/Monkeysphere/MSVA/Monitor.pm +++ b/Crypt/Monkeysphere/MSVA/Monitor.pm @@ -161,9 +161,10 @@ Would you like to restart the validation agent?"); sub DESTROY { my $self = shift; if (defined $self->{monitorpid}) { - # SIGTERM is 15: - kill(15, $self->{monitorpid}); + kill('TERM', $self->{monitorpid}); + my $oldexit = $?; waitpid($self->{monitorpid}, 0); + $? = $oldexit; undef($self->{monitorpid}); } }