@@ -505,6 +505,19 @@ static int get_exporter(struct transport *transport,
505
505
return start_command (fastexport );
506
506
}
507
507
508
+ static void check_helper_status (struct helper_data * data )
509
+ {
510
+ int pid , status ;
511
+
512
+ pid = waitpid (data -> helper -> pid , & status , WNOHANG );
513
+ if (pid < 0 )
514
+ die ("Could not retrieve status of remote helper '%s'" ,
515
+ data -> name );
516
+ if (pid > 0 && WIFEXITED (status ))
517
+ die ("Remote helper '%s' died with %d" ,
518
+ data -> name , WEXITSTATUS (status ));
519
+ }
520
+
508
521
static int fetch_with_import (struct transport * transport ,
509
522
int nr_heads , struct ref * * to_fetch )
510
523
{
@@ -541,6 +554,7 @@ static int fetch_with_import(struct transport *transport,
541
554
542
555
if (finish_command (& fastimport ))
543
556
die (_ ("error while running fast-import" ));
557
+ check_helper_status (data );
544
558
545
559
/*
546
560
* The fast-import stream of a remote helper that advertises
@@ -1160,6 +1174,7 @@ static int push_refs_with_export(struct transport *transport,
1160
1174
1161
1175
if (finish_command (& exporter ))
1162
1176
die (_ ("error while running fast-export" ));
1177
+ check_helper_status (data );
1163
1178
if (push_update_refs_status (data , remote_refs , flags ))
1164
1179
return 1 ;
1165
1180
0 commit comments