diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index b570a4295d..c7f853ce81 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3849,7 +3849,8 @@ fcntl(int fd, int cmd, ...) int ret; HANDLE hDup; if (!(DuplicateHandle(GetCurrentProcess(), (HANDLE)_get_osfhandle(fd), - GetCurrentProcess(), &hDup, 0L, TRUE, + GetCurrentProcess(), &hDup, 0L, + !(_osfile(fd) & FNOINHERIT), DUPLICATE_SAME_ACCESS))) { errno = map_errno(GetLastError()); return -1; |