@@ -489,6 +489,19 @@ static int get_exporter(struct transport *transport,
489
489
return start_command (fastexport );
490
490
}
491
491
492
+ static void check_helper_status (struct helper_data * data )
493
+ {
494
+ int pid , status ;
495
+
496
+ pid = waitpid (data -> helper -> pid , & status , WNOHANG );
497
+ if (pid < 0 )
498
+ die ("Could not retrieve status of remote helper '%s'" ,
499
+ data -> name );
500
+ if (pid > 0 && WIFEXITED (status ))
501
+ die ("Remote helper '%s' died with %d" ,
502
+ data -> name , WEXITSTATUS (status ));
503
+ }
504
+
492
505
static int fetch_with_import (struct transport * transport ,
493
506
int nr_heads , struct ref * * to_fetch )
494
507
{
@@ -525,6 +538,7 @@ static int fetch_with_import(struct transport *transport,
525
538
526
539
if (finish_command (& fastimport ))
527
540
die (_ ("error while running fast-import" ));
541
+ check_helper_status (data );
528
542
529
543
/*
530
544
* The fast-import stream of a remote helper that advertises
@@ -1129,6 +1143,7 @@ static int push_refs_with_export(struct transport *transport,
1129
1143
1130
1144
if (finish_command (& exporter ))
1131
1145
die (_ ("error while running fast-export" ));
1146
+ check_helper_status (data );
1132
1147
if (push_update_refs_status (data , remote_refs , flags ))
1133
1148
return 1 ;
1134
1149
0 commit comments