| author | |
| committer | |
| log | 21ca54f56013897573ba5aeb67d946deaa162200 |
| tree | 2e2304deaf526d431cbb179059613b11277877f9 |
| parent | 8ecd6c4d8c021f7778b4959bdf75204dfd2d1946 |
| signature | Commit is signed but in an unrecognized format. |
4 files changed, 6 insertions(+), 4 deletions(-)
lib/std/child_process.zig+1-1| ... | ... | @@ -235,7 +235,7 @@ pub const ChildProcess = struct { |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | fn waitUnwrappedWindows(self: *ChildProcess) !void { |
| 238 | const result = windows.WaitForSingleObject(self.handle, windows.INFINITE); | |
| 238 | const result = windows.WaitForSingleObjectEx(self.handle, windows.INFINITE, false); | |
| 239 | 239 | |
| 240 | 240 | self.term = @as(SpawnError!Term, x: { |
| 241 | 241 | var exit_code: windows.DWORD = undefined; |
lib/std/os/windows.zig+2-2| ... | ... | @@ -171,8 +171,8 @@ pub const WaitForSingleObjectError = error{ |
| 171 | 171 | Unexpected, |
| 172 | 172 | }; |
| 173 | 173 | |
| 174 | pub fn WaitForSingleObject(handle: HANDLE, milliseconds: DWORD) WaitForSingleObjectError!void { | |
| 175 | switch (kernel32.WaitForSingleObject(handle, milliseconds)) { | |
| 174 | pub fn WaitForSingleObjectEx(handle: HANDLE, milliseconds: DWORD, alertable: bool) WaitForSingleObjectError!void { | |
| 175 | switch (kernel32.WaitForSingleObjectEx(handle, milliseconds, @boolToInt(alertable))) { | |
| 176 | 176 | WAIT_ABANDONED => return error.WaitAbandoned, |
| 177 | 177 | WAIT_OBJECT_0 => return, |
| 178 | 178 | WAIT_TIMEOUT => return error.WaitTimeOut, |
lib/std/os/windows/kernel32.zig+2| ... | ... | @@ -205,6 +205,8 @@ pub extern "kernel32" stdcallcc fn TlsFree(dwTlsIndex: DWORD) BOOL; |
| 205 | 205 | |
| 206 | 206 | pub extern "kernel32" stdcallcc fn WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: DWORD) DWORD; |
| 207 | 207 | |
| 208 | pub extern "kernel32" stdcallcc fn WaitForSingleObjectEx(hHandle: HANDLE, dwMilliseconds: DWORD, bAlertable: BOOL) DWORD; | |
| 209 | ||
| 208 | 210 | pub extern "kernel32" stdcallcc fn WriteFile( |
| 209 | 211 | in_hFile: HANDLE, |
| 210 | 212 | in_lpBuffer: [*]const u8, |
lib/std/thread.zig+1-1| ... | ... | @@ -99,7 +99,7 @@ pub const Thread = struct { |
| 99 | 99 | os.munmap(self.data.memory); |
| 100 | 100 | }, |
| 101 | 101 | .windows => { |
| 102 | windows.WaitForSingleObject(self.data.handle, windows.INFINITE) catch unreachable; | |
| 102 | windows.WaitForSingleObjectEx(self.data.handle, windows.INFINITE, false) catch unreachable; | |
| 103 | 103 | windows.CloseHandle(self.data.handle); |
| 104 | 104 | windows.HeapFree(self.data.heap_handle, 0, self.data.alloc_start); |
| 105 | 105 | }, |