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