mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
36393: process queued signals during dotrap()
This commit is contained in:
parent
cdbd1b2581
commit
9f5dffa1f3
3 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-09-02 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 36393: Src/signals.c: process queued signals during dotrap()
|
||||
|
||||
2015-09-02 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 36378: Src/exec.c: skip directories when looking for autoload
|
||||
|
|
|
@ -1348,6 +1348,7 @@ void
|
|||
dotrap(int sig)
|
||||
{
|
||||
void *funcprog;
|
||||
int q = queue_signal_level();
|
||||
|
||||
if (sigtrapped[sig] & ZSIG_FUNC) {
|
||||
HashNode hn = gettrapnode(sig, 0);
|
||||
|
@ -1370,5 +1371,9 @@ dotrap(int sig)
|
|||
if ((sigtrapped[sig] & ZSIG_IGNORED) || !funcprog || errflag)
|
||||
return;
|
||||
|
||||
dont_queue_signals();
|
||||
|
||||
dotrapargs(sig, sigtrapped+sig, funcprog);
|
||||
|
||||
restore_queue_signals(q);
|
||||
}
|
||||
|
|
|
@ -288,3 +288,12 @@ F:anonymous function, and a descriptor leak when backgrounding a pipeline
|
|||
>0
|
||||
>0
|
||||
>0
|
||||
|
||||
# Regression test for workers/36392
|
||||
print -u $ZTST_fd 'This test takes 3 seconds and hangs the shell when it fails...'
|
||||
callfromchld() { true && { print CHLD } }
|
||||
TRAPCHLD() { callfromchld }
|
||||
sleep 2 & sleep 3; print OK
|
||||
0:Background job exit does not affect reaping foreground job
|
||||
>CHLD
|
||||
>OK
|
||||
|
|
Loading…
Reference in a new issue