mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
36104: change order of child_block() and dont_queue_signals() to resolve yet another race condition
This commit is contained in:
parent
a01f29c11d
commit
128bf385b1
3 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
2015-08-11 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 36104: Src/exec.c, Src/jobs.c: change order of child_block()
|
||||
and dont_queue_signals() to resolve yet another race condition
|
||||
|
||||
* 36092: Doc/Zsh/mod_zpty.yo, Src/Modules/zpty.c: return the pty
|
||||
master file descriptor in $REPLY for use with "zle -F" etc.
|
||||
|
||||
|
|
|
@ -1607,8 +1607,8 @@ execpline(Estate state, wordcode slcode, int how, int last1)
|
|||
!(jobtab[list_pipe_job].stat & STAT_STOPPED)) {
|
||||
int q = queue_signal_level();
|
||||
child_unblock();
|
||||
dont_queue_signals();
|
||||
child_block();
|
||||
dont_queue_signals();
|
||||
restore_queue_signals(q);
|
||||
}
|
||||
if (list_pipe_child &&
|
||||
|
|
|
@ -1420,9 +1420,9 @@ zwaitjob(int job, int wait_cmd)
|
|||
int q = queue_signal_level();
|
||||
Job jn = jobtab + job;
|
||||
|
||||
dont_queue_signals();
|
||||
child_block(); /* unblocked during signal_suspend() */
|
||||
queue_traps(wait_cmd);
|
||||
dont_queue_signals();
|
||||
if (jn->procs || jn->auxprocs) { /* if any forks were done */
|
||||
jn->stat |= STAT_LOCKED;
|
||||
if (jn->stat & STAT_CHANGED)
|
||||
|
@ -1478,9 +1478,9 @@ zwaitjob(int job, int wait_cmd)
|
|||
pipestats[0] = lastval;
|
||||
numpipestats = 1;
|
||||
}
|
||||
restore_queue_signals(q);
|
||||
unqueue_traps();
|
||||
child_unblock();
|
||||
restore_queue_signals(q);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue