diff options
author | jilles <jilles@FreeBSD.org> | 2010-01-01 18:17:46 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-01-01 18:17:46 +0000 |
commit | 446838eef9a2c4d195b487b7b741e56c01af2470 (patch) | |
tree | 6198da26b9a8cb29d4142aca530e1a661605a331 /bin/sh/parser.c | |
parent | 4ce9cced3fd3f56de8a72297d2a0f0939d4bb2f9 (diff) | |
download | FreeBSD-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/parser.c')
-rw-r--r-- | bin/sh/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index b85d10ad..f8fd0ed 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1560,8 +1560,8 @@ STATIC void synerror(const char *msg) { if (commandname) - outfmt(&errout, "%s: %d: ", commandname, startlinno); - outfmt(&errout, "Syntax error: %s\n", msg); + outfmt(out2, "%s: %d: ", commandname, startlinno); + outfmt(out2, "Syntax error: %s\n", msg); error((char *)NULL); } |