aboutsummaryrefslogtreecommitdiff
path: root/lib/std/array_list.zig
diff options
context:
space:
mode:
authorxEgoist <egoist@egoistic.dev>2023-05-04 19:42:27 -0500
committerAndrew Kelley <andrew@ziglang.org>2024-01-16 01:25:14 -0800
commit194ed308259e49af3f4725659e22ccd7457404e0 (patch)
treeda51480a82b6158902496d032115990001520e8e /lib/std/array_list.zig
parent41bf816fa6dd6fde0264db885c2f00757aba74b0 (diff)
downloadzig-194ed308259e49af3f4725659e22ccd7457404e0.tar.gz
zig-194ed308259e49af3f4725659e22ccd7457404e0.zip
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.
Diffstat (limited to 'lib/std/array_list.zig')
0 files changed, 0 insertions, 0 deletions