Excellent. This patch from Larry fixes the behavior of hush

when builtins are included in pipes.
This commit is contained in:
Eric Andersen 2001-05-22 22:34:51 +00:00
parent 9978576f15
commit 57e6a49e5b
2 changed files with 6 additions and 2 deletions

4
hush.c
View File

@ -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);
}
}

View File

@ -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);
}
}