summaryrefslogtreecommitdiffstats
path: root/bin/sh/expand.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-01-01 18:17:46 +0000
committerjilles <jilles@FreeBSD.org>2010-01-01 18:17:46 +0000
commit446838eef9a2c4d195b487b7b741e56c01af2470 (patch)
tree6198da26b9a8cb29d4142aca530e1a661605a331 /bin/sh/expand.c
parent4ce9cced3fd3f56de8a72297d2a0f0939d4bb2f9 (diff)
downloadFreeBSD-src-446838eef9a2c4d195b487b7b741e56c01af2470.zip
FreeBSD-src-446838eef9a2c4d195b487b7b741e56c01af2470.tar.gz
sh: Fix some bugs with backquoted builtins:
- correctly handle error output in $(builtin 2>&1), clarify out1/out2 vs output/errout in the code - treat all builtins as regular builtins so errors do not abort the shell and variable assignments do not persist - respect the caller's INTOFF Some bugs still exist: - expansion errors may still abort the shell - some side effects of expansions and builtins persist
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r--bin/sh/expand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index bb78151..876cde1 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -526,7 +526,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
case VSQUESTION:
if (*p != CTLENDVAR) {
- outfmt(&errout, "%s\n", startp);
+ outfmt(out2, "%s\n", startp);
error((char *)NULL);
}
error("%.*s: parameter %snot set", (int)(p - str - 1),
OpenPOWER on IntegriCloud