diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-01-16 13:44:18 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-01-16 13:44:18 +0000 |
commit | 757168e2c8af374436108266cc3cfd32a946a590 (patch) | |
tree | 293929274f50de8733f00c4ae561a85e9c5fc16f /Src/subst.c | |
parent | 052316fea3b74599de04fb3990a444b0ba08b04b (diff) | |
download | zsh-757168e2c8af374436108266cc3cfd32a946a590.tar.gz zsh-757168e2c8af374436108266cc3cfd32a946a590.tar.xz zsh-757168e2c8af374436108266cc3cfd32a946a590.zip |
remove 13108 (trap queues); replace with signal queueing to ensure that user signal handlers are only executed when it is safe to run them (13365)
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Src/subst.c b/Src/subst.c index 0cb985d71..bb90faf0c 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -51,6 +51,7 @@ prefork(LinkList list, int flags) { LinkNode node; + queue_signals(); for (node = firstnode(list); node; incnode(node)) { char *str, c; @@ -61,14 +62,18 @@ prefork(LinkList list, int flags) setdata(node, (void *) getproc(str)); /* <(...) or >(...) */ else setdata(node, (void *) getoutputfile(str)); /* =(...) */ - if (!getdata(node)) + if (!getdata(node)) { + unqueue_signals(); return; + } } else { if (isset(SHFILEEXPANSION)) filesub((char **)getaddrdata(node), flags & (PF_TYPESET|PF_ASSIGN)); - if (!(node = stringsubst(list, node, flags & PF_SINGLE))) + if (!(node = stringsubst(list, node, flags & PF_SINGLE))) { + unqueue_signals(); return; + } } } for (node = firstnode(list); node; incnode(node)) { @@ -82,9 +87,12 @@ prefork(LinkList list, int flags) flags & (PF_TYPESET|PF_ASSIGN)); } else if (!(flags & PF_SINGLE)) uremnode(list, node); - if (errflag) + if (errflag) { + unqueue_signals(); return; + } } + unqueue_signals(); } /**/ |