projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9052600
)
fix #>&- syntax for closing fds
author
Mike Frysinger
<vapier@gentoo.org>
Mon, 6 Apr 2009 12:35:41 +0000
(12:35 -0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Mon, 6 Apr 2009 12:35:41 +0000
(12:35 -0000)
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index 7e6d3567ba334b7a936f39bb56979c7d5e6d2a89..4f4012db89f702895c383fc665b5fb2d620b1318 100644
(file)
--- 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)