X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=53083860f84920f5599583bff0fe0ccb9819c9da;hb=82e96b6ad7d79f252e5343407cf2f718d3e03918;hp=497687ac2b7932d34a4eb5f893a0bdb647339b81;hpb=f2a1ab46505797714043bb64897135972f9ffe09;p=dgit.git diff --git a/dgit b/dgit index 497687ac..53083860 100755 --- a/dgit +++ b/dgit @@ -1504,16 +1504,6 @@ sub cmd_rpush { }; i_method "i_resp", $icmd, $iargs; } - - my $pid = $i_child_pid; - $i_child_pid = undef; # prevents killing some other process with same pid - printdebug "waiting for remote child $pid..."; - my $got = waitpid $pid, 0; - die $! unless $got == $pid; - die "remote child failed $?" if $?; - - i_cleanup(); - exit 0; } sub i_resp_progress ($) { @@ -1523,6 +1513,13 @@ sub i_resp_progress ($) { } sub i_resp_complete { + my $pid = $i_child_pid; + $i_child_pid = undef; # prevents killing some other process with same pid + printdebug "waiting for remote child $pid..."; + my $got = waitpid $pid, 0; + die $! unless $got == $pid; + die "remote child failed $?" if $?; + i_cleanup(); exit 0; }