| ... | ... | @@ -650,7 +650,7 @@ pub const ChildProcess = struct { |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | fn spawnWindows(self: *ChildProcess) SpawnError!void { |
| 653 | | const saAttr = windows.SECURITY_ATTRIBUTES{ |
| 653 | var saAttr = windows.SECURITY_ATTRIBUTES{ |
| 654 | 654 | .nLength = @sizeOf(windows.SECURITY_ATTRIBUTES), |
| 655 | 655 | .bInheritHandle = windows.TRUE, |
| 656 | 656 | .lpSecurityDescriptor = null, |
| ... | ... | @@ -661,8 +661,9 @@ pub const ChildProcess = struct { |
| 661 | 661 | const nul_handle = if (any_ignore) |
| 662 | 662 | // "\Device\Null" or "\??\NUL" |
| 663 | 663 | windows.OpenFile(&[_]u16{ '\\', 'D', 'e', 'v', 'i', 'c', 'e', '\\', 'N', 'u', 'l', 'l' }, .{ |
| 664 | | .access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE, |
| 665 | | .share_access = windows.FILE_SHARE_READ, |
| 664 | .access_mask = windows.GENERIC_READ | windows.GENERIC_WRITE | windows.SYNCHRONIZE, |
| 665 | .share_access = windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE, |
| 666 | .sa = &saAttr, |
| 666 | 667 | .creation = windows.OPEN_EXISTING, |
| 667 | 668 | .io_mode = .blocking, |
| 668 | 669 | }) catch |err| switch (err) { |
| ... | ... | @@ -680,9 +681,6 @@ pub const ChildProcess = struct { |
| 680 | 681 | defer { |
| 681 | 682 | if (any_ignore) os.close(nul_handle); |
| 682 | 683 | } |
| 683 | | if (any_ignore) { |
| 684 | | try windows.SetHandleInformation(nul_handle, windows.HANDLE_FLAG_INHERIT, 0); |
| 685 | | } |
| 686 | 684 | |
| 687 | 685 | var g_hChildStd_IN_Rd: ?windows.HANDLE = null; |
| 688 | 686 | var g_hChildStd_IN_Wr: ?windows.HANDLE = null; |