diff --git a/command.cpp b/command.cpp index b5b5d23..116135f 100644 --- a/command.cpp +++ b/command.cpp @@ -550,8 +550,9 @@ int pipe_command::execute(Environment &e, const fdmask &fds, bool throwup) { lseek(fd, 0, SEEK_SET); rv = children[1]->execute(e, pipe_fd | fds, throwup); - + return e.status(rv, throwup); } + if (children[0]) return children[0]->execute(e, fds, throwup); if (children[1]) return children[1]->execute(e, fds, throwup); return e.status(0, throwup);