Cygwin: dup: fix handle inheritence for disk file pread/pwrite handle

The handle is created non-inheritable but gets inheritable when
dup'ing the file descriptor.  Fix that.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2021-08-30 21:56:33 +02:00
parent dcb515a953
commit 9069cb9171
1 changed files with 1 additions and 1 deletions

View File

@ -1444,7 +1444,7 @@ fhandler_disk_file::dup (fhandler_base *child, int flags)
if (!ret && prw_handle
&& !DuplicateHandle (GetCurrentProcess (), prw_handle,
GetCurrentProcess (), &fhc->prw_handle,
0, TRUE, DUPLICATE_SAME_ACCESS))
0, FALSE, DUPLICATE_SAME_ACCESS))
fhc->prw_handle = NULL;
return ret;
}