From 1d1f787a7c2864149d037681badd196b363a3503 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 3 Apr 2012 16:03:59 +0100 Subject: Switch a call to copyfd back to fcntl(F_DUPFD) --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) /* Careful to not accidentally "save" * to the same fd as right side fd in N>&M */ int minfd = right_fd < 10 ? 10 : right_fd + 1; - i = copyfd(fd, minfd); + i = fcntl(fd, F_DUPFD, minfd); /* You'd expect copy to be CLOEXECed. Currently these extra "saved" fds * are closed in popredir() in the child, preventing them from leaking * into child. (popredir() also cleans up the mess in case of failures) -- cgit v1.2.3-55-g6feb