File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1541,9 +1541,9 @@ static struct parallel_processes_for_signal *pp_for_signal;
15411541
15421542static void handle_children_on_signal (int signo )
15431543{
1544+ if (!pp_for_signal )
1545+ return ;
15441546 kill_children_signal (pp_for_signal , signo );
1545- sigchain_pop (signo );
1546- raise (signo );
15471547}
15481548
15491549static void pp_init (struct parallel_processes * pp ,
@@ -1577,7 +1577,8 @@ static void pp_init(struct parallel_processes *pp,
15771577 pp_sig -> pp = pp ;
15781578 pp_sig -> opts = opts ;
15791579 pp_for_signal = pp_sig ;
1580- sigchain_push_common (handle_children_on_signal );
1580+ /* XXX should be idempotent */
1581+ cleanup_register (handle_children_on_signal );
15811582}
15821583
15831584static void pp_cleanup (struct parallel_processes * pp ,
@@ -1599,7 +1600,9 @@ static void pp_cleanup(struct parallel_processes *pp,
15991600 strbuf_write (& pp -> buffered_output , stderr );
16001601 strbuf_release (& pp -> buffered_output );
16011602
1602- sigchain_pop_common ();
1603+ /* should this be at the top? We are putting pp into a broken state */
1604+ /* should this be a stack or list that restores the previous entry? */
1605+ pp_for_signal = NULL ;
16031606}
16041607
16051608/* returns
You can’t perform that action at this time.
0 commit comments