diff options
-rw-r--r-- | shell/ash.c | 2 |
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) |