Fix opening NUL device on Windows

This commit is contained in:
Jakub Konka 2020-07-31 19:16:04 +02:00
parent 4d9eff4bdb
commit f6ae2505d9

View File

@ -484,7 +484,7 @@ pub const ChildProcess = struct {
const nul_handle = if (any_ignore)
windows.OpenFile(&[_]u16{ 'N', 'U', 'L' }, .{
.dir = std.fs.cwd().fd,
.access_mask = windows.GENERIC_READ,
.access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,
.share_access = windows.FILE_SHARE_READ,
.creation = windows.OPEN_EXISTING,
.io_mode = .blocking,