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