aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 7e6d3567b..4f4012db8 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2064,7 +2064,8 @@ static int setup_redirects(struct command *prog, int squirrel[])
2064 squirrel[redir->fd] = dup(redir->fd); 2064 squirrel[redir->fd] = dup(redir->fd);
2065 } 2065 }
2066 if (openfd == -3) { 2066 if (openfd == -3) {
2067 //close(openfd); // close(-3) ??! 2067 /* "-" means "close me" and we use -3 for that */
2068 close(redir->fd);
2068 } else { 2069 } else {
2069 dup2(openfd, redir->fd); 2070 dup2(openfd, redir->fd);
2070 if (redir->dup == -1) 2071 if (redir->dup == -1)