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:
parent
dcb515a953
commit
9069cb9171
|
@ -1444,7 +1444,7 @@ fhandler_disk_file::dup (fhandler_base *child, int flags)
|
||||||
if (!ret && prw_handle
|
if (!ret && prw_handle
|
||||||
&& !DuplicateHandle (GetCurrentProcess (), prw_handle,
|
&& !DuplicateHandle (GetCurrentProcess (), prw_handle,
|
||||||
GetCurrentProcess (), &fhc->prw_handle,
|
GetCurrentProcess (), &fhc->prw_handle,
|
||||||
0, TRUE, DUPLICATE_SAME_ACCESS))
|
0, FALSE, DUPLICATE_SAME_ACCESS))
|
||||||
fhc->prw_handle = NULL;
|
fhc->prw_handle = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue