authorgravatar for codi@code-disaster.comDaniel Ludwig <codi@code-disaster.com> 2020-09-03 08:51:10+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-09-06 18:25:33-04:00
loga8a806e925ddb2362e0021bd83dd73f7389a2dbb
treec9047b64bf4ccf676f1a7c6f1ed7cd1e1d435188
parent32a77a6047d378e3bf5b9e8d071f182dc64823f8

std.ChildProcess: use "\Device\Null" on Windows


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/child_process.zig+2-2
...@@ -485,8 +485,8 @@ pub const ChildProcess = struct {...@@ -485,8 +485,8 @@ pub const ChildProcess = struct {
485 const any_ignore = (self.stdin_behavior == StdIo.Ignore or self.stdout_behavior == StdIo.Ignore or self.stderr_behavior == StdIo.Ignore);485 const any_ignore = (self.stdin_behavior == StdIo.Ignore or self.stdout_behavior == StdIo.Ignore or self.stderr_behavior == StdIo.Ignore);
486486
487 const nul_handle = if (any_ignore)487 const nul_handle = if (any_ignore)
488 windows.OpenFile(&[_]u16{ 'N', 'U', 'L' }, .{488 // "\Device\Null" or "\??\NUL"
489 .dir = std.fs.cwd().fd,489 windows.OpenFile(&[_]u16{ '\\', 'D', 'e', 'v', 'i', 'c', 'e', '\\', 'N', 'u', 'l', 'l' }, .{
490 .access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,490 .access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,
491 .share_access = windows.FILE_SHARE_READ,491 .share_access = windows.FILE_SHARE_READ,
492 .creation = windows.OPEN_EXISTING,492 .creation = windows.OPEN_EXISTING,