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/error.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/error.c')
-rw-r--r-- | bin/sh/error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/error.c b/bin/sh/error.c index 3fc7101..1f981f0 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -160,8 +160,8 @@ exverror(int cond, const char *msg, va_list ap) #endif if (msg) { if (commandname) - outfmt(&errout, "%s: ", commandname); - doformat(&errout, msg, ap); + outfmt(out2, "%s: ", commandname); + doformat(out2, msg, ap); out2c('\n'); } flushall(); |