diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index 457e4a255f857a80bd7f487b52c9db83027a4370..c6473678a20326c606cabf29bd16e27af9ffd843 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -15347,8 +15347,7 @@ fn childKillWindows(t: *Threaded, child: *process.Child, exit_code: windows.UINT _ = windows.ntdll.RtlReportSilentProcessExit(handle, @fromBackingInt(@intCast(exit_code))); switch (windows.ntdll.NtTerminateProcess(handle, @fromBackingInt(@intCast(exit_code)))) { .SUCCESS, .PROCESS_IS_TERMINATING => { - const infinite_timeout: windows.LARGE_INTEGER = std.math.minInt(windows.LARGE_INTEGER); - _ = windows.ntdll.NtWaitForSingleObject(handle, .FALSE, &infinite_timeout); + _ = windows.ntdll.NtWaitForSingleObject(handle, .FALSE, null); childCleanupWindows(child); }, .ACCESS_DENIED => { @@ -15371,8 +15370,7 @@ fn childWaitWindows(child: *process.Child) process.Child.WaitError!process.Child const handle = child.id.?; const alertable_syscall: AlertableSyscall = try .start(); - const infinite_timeout: windows.LARGE_INTEGER = std.math.minInt(windows.LARGE_INTEGER); - while (true) switch (windows.ntdll.NtWaitForSingleObject(handle, .TRUE, &infinite_timeout)) { + while (true) switch (windows.ntdll.NtWaitForSingleObject(handle, .TRUE, null)) { windows.NTSTATUS.WAIT_0 => break alertable_syscall.finish(), .USER_APC, .ALERTED, .TIMEOUT => { try alertable_syscall.checkCancel(); diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index 05125adbe852a3586b4d77fa2d0f8f7dd4d4bb94..ad3fc383d9f5564d88ffec430d390f8cb75fd9bb 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -639,8 +639,7 @@ const WindowsThreadImpl = struct { } fn join(self: Impl) void { - const infinite_timeout: windows.LARGE_INTEGER = std.math.minInt(windows.LARGE_INTEGER); - switch (windows.ntdll.NtWaitForSingleObject(self.thread.thread_handle, .FALSE, &infinite_timeout)) { + switch (windows.ntdll.NtWaitForSingleObject(self.thread.thread_handle, .FALSE, null)) { windows.NTSTATUS.WAIT_0 => {}, else => |status| windows.unexpectedStatus(status) catch unreachable, } diff --git a/test/standalone/windows_argv/fuzz.zig b/test/standalone/windows_argv/fuzz.zig index 5169a3f54e42688eeb16532657f012cdb9edb422..743f73f7c96712d0823448f36fe69f31d518df71 100644 --- a/test/standalone/windows_argv/fuzz.zig +++ b/test/standalone/windows_argv/fuzz.zig @@ -147,8 +147,7 @@ fn spawnVerify(verify_path: [:0]const u16, cmd_line: [:0]const u16) !windows.DWO break :spawn proc_info.hProcess; }; defer windows.CloseHandle(child_proc); - const infinite_timeout: windows.LARGE_INTEGER = std.math.minInt(windows.LARGE_INTEGER); - switch (windows.ntdll.NtWaitForSingleObject(child_proc, .FALSE, &infinite_timeout)) { + switch (windows.ntdll.NtWaitForSingleObject(child_proc, .FALSE, null)) { windows.NTSTATUS.WAIT_0 => {}, .TIMEOUT => return error.WaitTimeOut, else => |status| return windows.unexpectedStatus(status),