summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2014-08-10 20:42:58 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2014-08-10 20:42:58 +0100
commit8c229ab1d6afbf7008d3be50d5c33fa7a3dc88ab (patch)
tree0aedbbb7ee8294800eb55a8c25840612e010444d
parentf0e2a4873a21f9b0399686aad295938891dc5417 (diff)
When killing build subprocess during failure of rpush, try reaping it (so we can report it) before killing it.
-rwxr-xr-xdgit10
1 files changed, 6 insertions, 4 deletions
diff --git a/dgit b/dgit
index 59fabaf..4095387 100755
--- a/dgit
+++ b/dgit
@@ -1750,12 +1750,14 @@ sub cmd_remote_push_responder {
}
our $i_tmp;
-our $i_child_pid;
sub i_cleanup {
- local ($@);
- if ($i_child_pid) {
- printdebug "(killing remote child $i_child_pid)\n";
+ local ($@, $?);
+ my $report = i_child_report();
+ if (defined $report) {
+ printdebug "($report)\n";
+ } elsif ($i_child_pid) {
+ printdebug "(killing build host child $i_child_pid)\n";
kill 15, $i_child_pid;
}
if (defined $i_tmp && !defined $initiator_tempdir) {