aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-04-03 16:03:59 +0100
committerRon Yorston <rmy@pobox.com>2012-04-03 16:03:59 +0100
commit1d1f787a7c2864149d037681badd196b363a3503 (patch)
tree7216496161f51dfe6d037503e9dd43e585bf1071
parent6a82920046979ff373ec55b1ace6e542c8cb13f5 (diff)
downloadbusybox-w32-1d1f787a7c2864149d037681badd196b363a3503.tar.gz
busybox-w32-1d1f787a7c2864149d037681badd196b363a3503.tar.bz2
busybox-w32-1d1f787a7c2864149d037681badd196b363a3503.zip
Switch a call to copyfd back to fcntl(F_DUPFD)
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 4766af34a..a446a6699 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5664,7 +5664,7 @@ redirect(union node *redir, int flags)
5664 /* Careful to not accidentally "save" 5664 /* Careful to not accidentally "save"
5665 * to the same fd as right side fd in N>&M */ 5665 * to the same fd as right side fd in N>&M */
5666 int minfd = right_fd < 10 ? 10 : right_fd + 1; 5666 int minfd = right_fd < 10 ? 10 : right_fd + 1;
5667 i = copyfd(fd, minfd); 5667 i = fcntl(fd, F_DUPFD, minfd);
5668/* You'd expect copy to be CLOEXECed. Currently these extra "saved" fds 5668/* You'd expect copy to be CLOEXECed. Currently these extra "saved" fds
5669 * are closed in popredir() in the child, preventing them from leaking 5669 * are closed in popredir() in the child, preventing them from leaking
5670 * into child. (popredir() also cleans up the mess in case of failures) 5670 * into child. (popredir() also cleans up the mess in case of failures)