aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/lash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/lash.c b/shell/lash.c
index fa416c742..f454e6990 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -656,6 +656,7 @@ static int setup_redirects(struct child_prog *prog, int squirrel[])
656 if (openfd != redir->fd) { 656 if (openfd != redir->fd) {
657 if (squirrel && redir->fd < 3) { 657 if (squirrel && redir->fd < 3) {
658 squirrel[redir->fd] = dup(redir->fd); 658 squirrel[redir->fd] = dup(redir->fd);
659 fcntl (squirrel[redir->fd], F_SETFD, FD_CLOEXEC);
659 } 660 }
660 dup2(openfd, redir->fd); 661 dup2(openfd, redir->fd);
661 close(openfd); 662 close(openfd);