aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-05 16:50:08 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-06-05 16:50:08 +0000
commit3728d1a7934ffafd6b8d11d98c96aa437dcf01b5 (patch)
treeaaad20944b2a54e3159a24d4a0be9fe52abe0a7f /shell
parent31ac2e50f0eb74c66f0971ddc658fbfe8afa3d1a (diff)
downloadbusybox-w32-3728d1a7934ffafd6b8d11d98c96aa437dcf01b5.tar.gz
busybox-w32-3728d1a7934ffafd6b8d11d98c96aa437dcf01b5.tar.bz2
busybox-w32-3728d1a7934ffafd6b8d11d98c96aa437dcf01b5.zip
Don't close file descriptors when we are duplicating them.
git-svn-id: svn://busybox.net/trunk/busybox@2793 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 372c95753..a58da189c 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1018,7 +1018,8 @@ static int setup_redirects(struct child_prog *prog, int squirrel[])
1018 close(openfd); 1018 close(openfd);
1019 } else { 1019 } else {
1020 dup2(openfd, redir->fd); 1020 dup2(openfd, redir->fd);
1021 close(openfd); 1021 if (redir->dup == -1)
1022 close (openfd);
1022 } 1023 }
1023 } 1024 }
1024 } 1025 }