From: Mike Frysinger Date: Mon, 6 Apr 2009 12:35:41 +0000 (-0000) Subject: fix #>&- syntax for closing fds X-Git-Tag: 1_14_0~84 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc4178050a9e150d26fe7041191a5d124fcdf03c;p=oweals%2Fbusybox.git fix #>&- syntax for closing fds --- 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[]) squirrel[redir->fd] = dup(redir->fd); } if (openfd == -3) { - //close(openfd); // close(-3) ??! + /* "-" means "close me" and we use -3 for that */ + close(redir->fd); } else { dup2(openfd, redir->fd); if (redir->dup == -1)