1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

42705: Another safety fix for pgrp reclaiming.

Only do this if killpg(dead_pid, 0) returns -1, indicating
the pgprp doesn't exist any more, else there is a race
if other proceses have started using it.
This commit is contained in:
Peter Stephenson 2018-04-23 15:11:34 +01:00
parent 11f18457d2
commit 9ad9c5cda1
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2018-04-23 Peter Stephenson <p.stephenson@samsung.com>
* 42705: Src/signals.c: another fix for 42630 --- also check
that killpg(pgrp, 0) is -1.
* 23362: Src/parse.c: Allow short loops with "while".
2018-04-20 Peter Stephenson <p.stephenson@samsung.com>

View file

@ -538,7 +538,8 @@ wait_for_processes(void)
update_process(pn, status);
#endif
if (WIFEXITED(status) &&
pn->pid == jn->gleader) {
pn->pid == jn->gleader &&
killpg(pn->pid, 0) == -1) {
jn->gleader = 0;
if (!(jn->stat & STAT_NOSTTY)) {
/*