Make all handles non-inheritable by default

The sockets are left as non-inheritable because they
never should be inherited.
This commit is contained in:
flysand7
2024-07-18 22:50:47 +11:00
parent 0bb4cc6ce5
commit 4dcb75af6d
4 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ _open_internal :: proc(name: string, flags: File_Flags, perm: File_Mode) -> (han
share_mode := u32(win32.FILE_SHARE_READ | win32.FILE_SHARE_WRITE)
sa := win32.SECURITY_ATTRIBUTES {
nLength = size_of(win32.SECURITY_ATTRIBUTES),
bInheritHandle = .Close_On_Exec not_in flags,
bInheritHandle = .Inheritable in flags,
}
create_mode: u32 = win32.OPEN_EXISTING