From 377e7c3417a1a46035efd9aeb9875070ea452f5c Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 00:36:22 +0200 Subject: win32: ash: stay away from fcntl(F_DUPFD) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- shell/ash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index a0c22689f..007d501f9 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -3715,7 +3715,7 @@ setjobctl(int on) if (--fd < 0) goto out; } - fd = fcntl(fd, F_DUPFD, 10); + fd = copyfd(fd, 10); if (ofd >= 0) close(ofd); if (fd < 0) @@ -5270,7 +5270,7 @@ redirect(union node *redir, int flags) #endif if (need_to_remember(sv, fd)) { /* Copy old descriptor */ - i = fcntl(fd, F_DUPFD, 10); + i = copyfd(fd, 10); /* 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