@@ -429,6 +429,19 @@ static int get_exporter(struct transport *transport,
429
429
return start_command (fastexport );
430
430
}
431
431
432
+ static void check_helper_status (struct helper_data * data )
433
+ {
434
+ int pid , status ;
435
+
436
+ pid = waitpid (data -> helper -> pid , & status , WNOHANG );
437
+ if (pid < 0 )
438
+ die ("Could not retrieve status of remote helper '%s'" ,
439
+ data -> name );
440
+ if (pid > 0 && WIFEXITED (status ))
441
+ die ("Remote helper '%s' died with %d" ,
442
+ data -> name , WEXITSTATUS (status ));
443
+ }
444
+
432
445
static int fetch_with_import (struct transport * transport ,
433
446
int nr_heads , struct ref * * to_fetch )
434
447
{
@@ -465,6 +478,7 @@ static int fetch_with_import(struct transport *transport,
465
478
466
479
if (finish_command (& fastimport ))
467
480
die ("Error while running fast-import" );
481
+ check_helper_status (data );
468
482
469
483
/*
470
484
* The fast-import stream of a remote helper that advertises
@@ -923,6 +937,7 @@ static int push_refs_with_export(struct transport *transport,
923
937
924
938
if (finish_command (& exporter ))
925
939
die ("Error while running fast-export" );
940
+ check_helper_status (data );
926
941
if (push_update_refs_status (data , remote_refs , flags ))
927
942
return 1 ;
928
943
0 commit comments