From 0c2e32f392227c20bff140ce771a6f3be336a765 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Tue, 26 Oct 2010 23:18:52 -0400 Subject: [PATCH] avoid re-setting the exit code after waiting for upgrade monitoring process to terminate --- Crypt/Monkeysphere/MSVA/Monitor.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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}); } } -- 2.26.2