diff options
Diffstat (limited to 'shell/lash.c')
-rw-r--r-- | shell/lash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/lash.c b/shell/lash.c index 5ba490f2a..af3a8f80b 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -576,7 +576,7 @@ static int setup_redirects(struct child_prog *prog, int squirrel[]) | |||
576 | if (openfd != redir->fd) { | 576 | if (openfd != redir->fd) { |
577 | if (squirrel && redir->fd < 3) { | 577 | if (squirrel && redir->fd < 3) { |
578 | squirrel[redir->fd] = dup(redir->fd); | 578 | squirrel[redir->fd] = dup(redir->fd); |
579 | fcntl(squirrel[redir->fd], F_SETFD, FD_CLOEXEC); | 579 | close_on_exec_on(squirrel[redir->fd]); |
580 | } | 580 | } |
581 | dup2(openfd, redir->fd); | 581 | dup2(openfd, redir->fd); |
582 | close(openfd); | 582 | close(openfd); |