aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-25 18:12:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-25 18:12:15 +0200
commit960ca385b721400082323da7f8cddb7f3cfb3027 (patch)
tree99774852252f72d4769555e35516fcba24c6097c
parent6a94cee409e4e2f4394d022703bfbe402c3cdee5 (diff)
downloadbusybox-w32-960ca385b721400082323da7f8cddb7f3cfb3027.tar.gz
busybox-w32-960ca385b721400082323da7f8cddb7f3cfb3027.tar.bz2
busybox-w32-960ca385b721400082323da7f8cddb7f3cfb3027.zip
ash: add comment explaining "set -e; $(cmd)" discrepancy
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index cf48b7743..79439bf3e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5924,6 +5924,14 @@ evalbackcmd(union node *n, struct backcmd *result)
5924 copyfd(pip[1], 1 | COPYFD_EXACT); 5924 copyfd(pip[1], 1 | COPYFD_EXACT);
5925 close(pip[1]); 5925 close(pip[1]);
5926 } 5926 }
5927/* TODO: eflag clearing makes the following not abort:
5928 * ash -c 'set -e; z=$(false;echo foo); echo $z'
5929 * which is what bash does (unless it is in POSIX mode).
5930 * dash deleted "eflag = 0" line in the commit
5931 * Date: Mon, 28 Jun 2010 17:11:58 +1000
5932 * [EVAL] Don't clear eflag in evalbackcmd
5933 * For now, preserve bash-like behavior, it seems to be somewhat more useful:
5934 */
5927 eflag = 0; 5935 eflag = 0;
5928 evaltree(n, EV_EXIT); /* actually evaltreenr... */ 5936 evaltree(n, EV_EXIT); /* actually evaltreenr... */
5929 /* NOTREACHED */ 5937 /* NOTREACHED */