zig/lib/std/os
xEgoist 194ed30825 child_process: Use security attributes while creating handle.
As suggested by @matu3ba, it can be better to use Security Attributes
directly while creating the handle instead of creating the handle then
setting the handle to inherit. Doing so can prevent potentially leaking
to other parallel spawned processes which would inherit the opened `\Device\Null`
handle.

This change also allows windows.OpenFile to handle when bInheritHandle
is set.

Note that we are using the same `saAttr`, but since it's taken as a
pointer to a const in all calls, it's never mutated, and OpenFile never alters it.

This also saves 1 kernel call for setting the handle to inherit.
2024-01-16 01:25:14 -08:00
..
linux Linux: Update syscalls for the 6.7 release 2024-01-15 20:05:03 +11:00
plan9 plan 9: filesystem support 2023-08-02 17:39:52 -04:00
uefi lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
windows add ability to open dlls with platform-specific flags (#18370) 2024-01-09 20:11:22 -05:00
emscripten.zig Added basic support for wasm32-emscripten target 2023-09-22 12:49:03 -07:00
linux.zig Linux: Add syscall bindings, enhance documentation. 2024-01-15 20:05:03 +11:00
plan9.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
test.zig Rework fchmodat tests 2024-01-13 23:52:01 -07:00
uefi.zig os.uefi: add ns to epoch 2023-12-20 20:05:16 -08:00
wasi.zig wasi: update sock_recv and sock_send according to preview1 2023-09-18 00:27:27 -07:00
windows.zig child_process: Use security attributes while creating handle. 2024-01-16 01:25:14 -08:00