summaryrefslogtreecommitdiff
path: root/hush.c
diff options
context:
space:
mode:
authorEric Andersen2001-05-22 22:34:51 +0000
committerEric Andersen2001-05-22 22:34:51 +0000
commit57e6a49e5bbe1a6519d7507d7cd9b02e5ceca694 (patch)
treed0c71adb5b72fd47d28c21dc957f0a7192dd00c6 /hush.c
parent9978576f15b5bc1a60543e24722584b36b574933 (diff)
downloadbusybox-57e6a49e5bbe1a6519d7507d7cd9b02e5ceca694.zip
busybox-57e6a49e5bbe1a6519d7507d7cd9b02e5ceca694.tar.gz
Excellent. This patch from Larry fixes the behavior of hush
when builtins are included in pipes.
Diffstat (limited to 'hush.c')
-rw-r--r--hush.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hush.c b/hush.c
index f995f6f..40787a4 100644
--- a/hush.c
+++ b/hush.c
@@ -1090,7 +1090,9 @@ static void pseudo_exec(struct child_prog *child)
for (x = bltins; x->cmd; x++) {
if (strcmp(child->argv[0], x->cmd) == 0 ) {
debug_printf("builtin exec %s\n", child->argv[0]);
- _exit(x->function(child));
+ rcode = x->function(child);
+ fflush(stdout);
+ _exit(rcode);
}
}