Merge pull request #3940 from flysand7/os2-handle-inheritance

[os2] Make all handles non-inheritable by default
This commit is contained in:
gingerBill
2024-07-19 11:38:03 +01:00
committed by GitHub
6 changed files with 22 additions and 10 deletions
+10 -2
View File
@@ -66,7 +66,7 @@ File_Flag :: enum {
Sync,
Trunc,
Sparse,
Close_On_Exec,
Inheritable,
Unbuffered_IO,
}
@@ -80,7 +80,15 @@ O_EXCL :: File_Flags{.Excl}
O_SYNC :: File_Flags{.Sync}
O_TRUNC :: File_Flags{.Trunc}
O_SPARSE :: File_Flags{.Sparse}
O_CLOEXEC :: File_Flags{.Close_On_Exec}
/*
If specified, the file handle is inherited upon the creation of a child
process. By default all handles are created non-inheritable.
**Note**: The standard file handles (stderr, stdout and stdin) are always
initialized as inheritable.
*/
O_INHERITABLE :: File_Flags{.Inheritable}
stdin: ^File = nil // OS-Specific
stdout: ^File = nil // OS-Specific