@@ -484,6 +484,19 @@ static int get_exporter(struct transport *transport,
484
484
return start_command (fastexport );
485
485
}
486
486
487
+ static void check_helper_status (struct helper_data * data )
488
+ {
489
+ int pid , status ;
490
+
491
+ pid = waitpid (data -> helper -> pid , & status , WNOHANG );
492
+ if (pid < 0 )
493
+ die ("Could not retrieve status of remote helper '%s'" ,
494
+ data -> name );
495
+ if (pid > 0 && WIFEXITED (status ))
496
+ die ("Remote helper '%s' died with %d" ,
497
+ data -> name , WEXITSTATUS (status ));
498
+ }
499
+
487
500
static int fetch_with_import (struct transport * transport ,
488
501
int nr_heads , struct ref * * to_fetch )
489
502
{
@@ -520,6 +533,7 @@ static int fetch_with_import(struct transport *transport,
520
533
521
534
if (finish_command (& fastimport ))
522
535
die (_ ("error while running fast-import" ));
536
+ check_helper_status (data );
523
537
524
538
/*
525
539
* The fast-import stream of a remote helper that advertises
@@ -1124,6 +1138,7 @@ static int push_refs_with_export(struct transport *transport,
1124
1138
1125
1139
if (finish_command (& exporter ))
1126
1140
die (_ ("error while running fast-export" ));
1141
+ check_helper_status (data );
1127
1142
if (push_update_refs_status (data , remote_refs , flags ))
1128
1143
return 1 ;
1129
1144
0 commit comments