Commit 1069ad3c by Edward Thomson

win32: do not inherit file descriptors

parent d5e6ca1e
...@@ -440,7 +440,14 @@ GIT_INLINE(int) open_once( ...@@ -440,7 +440,14 @@ GIT_INLINE(int) open_once(
DWORD attributes, DWORD attributes,
int osf_flags) int osf_flags)
{ {
HANDLE handle = CreateFileW(path, access, sharing, NULL, SECURITY_ATTRIBUTES security;
int fd;
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.lpSecurityDescriptor = NULL;
security.bInheritHandle = 0;
HANDLE handle = CreateFileW(path, access, sharing, &security,
creation_disposition, attributes, 0); creation_disposition, attributes, 0);
if (handle == INVALID_HANDLE_VALUE) { if (handle == INVALID_HANDLE_VALUE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment