From cdfb42fd67558847b689c69b6fdd23016e7220eb Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Mon, 28 Jun 2010 17:11:58 +1000 Subject: [EVAL] Don't clear eflag in evalbackcmd According to http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_12 "A subshell environment shall be created as a duplicate of the shell environment, except that signal traps set by that shell environment shall be set to the default values." Currently the eflag is cleared when forking a subshell, e.g. $ dash -c 'set -e ; z=$(false;echo foo) ; echo $z' foo With this commit the eflag is preserved for subshells, and dash exits 1 before echo. The problem was reported by Vincent Lefevre through http://bugs.debian.org/514863 Signed-off-by: Gerrit Pape Signed-off-by: Herbert Xu --- ChangeLog | 4 ++++ src/eval.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5a11a8c..e45405c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-06-28 Gerrit Pape + + * Don't clear eflag in evalbackcmd. + 2010-05-29 Herbert Xu * Continue after EINTR in read(1) with no pending signals. diff --git a/src/eval.c b/src/eval.c index 439f881..d142412 100644 --- a/src/eval.c +++ b/src/eval.c @@ -625,7 +625,6 @@ evalbackcmd(union node *n, struct backcmd *result) dup2(pip[1], 1); close(pip[1]); } - eflag = 0; evaltreenr(n, EV_EXIT); /* NOTREACHED */ } -- cgit 1.4.1 nput type='hidden' name='id' value='ead9b3b7110b0c8b020f55ad2f8ad122f1604b60'/>
Commit message (Expand)Author
2022-11-01Update to Linux man-pages 6.01 2063.91Štěpán Němec
2022-10-21Update to OpenBSD 7.2 2063.9June McEnroe
2022-10-16NetBSD: include text.tar.xz man pages 2063.8Štěpán Němec
2022-10-16Update to Linux man-mages 6.00Štěpán Němec
2022-10-16Update to NetBSD 9.3Štěpán Němec
2022-09-18Make copyrights and AUTHORS consistentJune McEnroe
2022-07-27Update to FreeBSD 13.1 2062.83June McEnroe
2022-07-27openbsd: Include man pages from baseXX.tgzKeith Whitney
2022-05-08Update to OpenBSD 7.1 2062.73June McEnroe
2021-10-15Update to OpenBSD 7.0 2062.63June McEnroe
2021-08-29Update to Linux man-pages 5.13 2062.53Štěpán Němec
2021-08-26Update to NetBSD 9.2 2062.52June McEnroe
2021-08-26Support DESTDIR in install/uninstallJune McEnroe
2021-08-26Add version number generatorJune McEnroe
2021-08-22Add ISC license headerJune McEnroe
2021-08-22Update to Linux man-pages 5.12Štěpán Němec
2021-06-21Add manuals for macOS 11.3June McEnroe
2021-05-08Update to OpenBSD 6.9June McEnroe
2021-04-26Update to Linux man-pages 5.11June McEnroe
2021-04-26Update to FreeBSD 13.0June McEnroe
2021-01-27Completely rewrite how manuals are fetched and installedJune McEnroe
2020-12-14Update to man-pages-posix 2017-aJune McEnroe
2020-12-14Update to OpenBSD 6.8June McEnroe
2020-12-14Update to NetBSD 9.1June McEnroe
2020-12-14Update to man-pages 5.09June McEnroe
2020-12-14Update to FreeBSD 12.2June McEnroe
2020-06-08Update to OpenBSD 6.7June McEnroe
2020-05-04Add hack for macOS to search extra man sectionsJune McEnroe
2020-05-04Don't clear MANSECTJune McEnroe