| ... | @@ -2759,12 +2759,7 @@ fn dirCreateDirPathOpenWasi( | ... | @@ -2759,12 +2759,7 @@ fn dirCreateDirPathOpenWasi( |
| 2759 | | 2759 | |
| 2760 | fn dirStat(userdata: ?*anyopaque, dir: Dir) Dir.StatError!Dir.Stat { | 2760 | fn dirStat(userdata: ?*anyopaque, dir: Dir) Dir.StatError!Dir.Stat { |
| 2761 | const t: *Threaded = @ptrCast(@alignCast(userdata)); | 2761 | const t: *Threaded = @ptrCast(@alignCast(userdata)); |
| 2762 | const file: File = if (is_windows) .{ | 2762 | const file: File = .{ .handle = dir.handle }; |
| 2763 | .handle = dir.handle, | | |
| 2764 | .flags = .{ .nonblocking = false }, | | |
| 2765 | } else .{ | | |
| 2766 | .handle = dir.handle, | | |
| 2767 | }; | | |
| 2768 | return fileStat(t, file); | 2763 | return fileStat(t, file); |
| 2769 | } | 2764 | } |
| 2770 | | 2765 | |
| ... | @@ -3686,10 +3681,7 @@ fn dirCreateFileWindows( | ... | @@ -3686,10 +3681,7 @@ fn dirCreateFileWindows( |
| 3686 | errdefer windows.CloseHandle(handle); | 3681 | errdefer windows.CloseHandle(handle); |
| 3687 | | 3682 | |
| 3688 | const exclusive = switch (flags.lock) { | 3683 | const exclusive = switch (flags.lock) { |
| 3689 | .none => return .{ | 3684 | .none => return .{ .handle = handle }, |
| 3690 | .handle = handle, | | |
| 3691 | .flags = .{ .nonblocking = false }, | | |
| 3692 | }, | | |
| 3693 | .shared => false, | 3685 | .shared => false, |
| 3694 | .exclusive => true, | 3686 | .exclusive => true, |
| 3695 | }; | 3687 | }; |
| ... | @@ -3709,10 +3701,7 @@ fn dirCreateFileWindows( | ... | @@ -3709,10 +3701,7 @@ fn dirCreateFileWindows( |
| 3709 | )) { | 3701 | )) { |
| 3710 | .SUCCESS => { | 3702 | .SUCCESS => { |
| 3711 | syscall.finish(); | 3703 | syscall.finish(); |
| 3712 | return .{ | 3704 | return .{ .handle = handle }; |
| 3713 | .handle = handle, | | |
| 3714 | .flags = .{ .nonblocking = false }, | | |
| 3715 | }; | | |
| 3716 | }, | 3705 | }, |
| 3717 | .INSUFFICIENT_RESOURCES => return syscall.fail(error.SystemResources), | 3706 | .INSUFFICIENT_RESOURCES => return syscall.fail(error.SystemResources), |
| 3718 | .LOCK_NOT_GRANTED => return syscall.fail(error.WouldBlock), | 3707 | .LOCK_NOT_GRANTED => return syscall.fail(error.WouldBlock), |
| ... | @@ -4287,10 +4276,7 @@ pub fn dirOpenFileWtf16( | ... | @@ -4287,10 +4276,7 @@ pub fn dirOpenFileWtf16( |
| 4287 | errdefer w.CloseHandle(handle); | 4276 | errdefer w.CloseHandle(handle); |
| 4288 | | 4277 | |
| 4289 | const exclusive = switch (flags.lock) { | 4278 | const exclusive = switch (flags.lock) { |
| 4290 | .none => return .{ | 4279 | .none => return .{ .handle = handle }, |
| 4291 | .handle = handle, | | |
| 4292 | .flags = .{ .nonblocking = false }, | | |
| 4293 | }, | | |
| 4294 | .shared => false, | 4280 | .shared => false, |
| 4295 | .exclusive => true, | 4281 | .exclusive => true, |
| 4296 | }; | 4282 | }; |
| ... | @@ -4313,10 +4299,7 @@ pub fn dirOpenFileWtf16( | ... | @@ -4313,10 +4299,7 @@ pub fn dirOpenFileWtf16( |
| 4313 | .ACCESS_VIOLATION => |err| return syscall.ntstatusBug(err), // bad io_status_block pointer | 4299 | .ACCESS_VIOLATION => |err| return syscall.ntstatusBug(err), // bad io_status_block pointer |
| 4314 | else => |status| return syscall.unexpectedNtstatus(status), | 4300 | else => |status| return syscall.unexpectedNtstatus(status), |
| 4315 | }; | 4301 | }; |
| 4316 | return .{ | 4302 | return .{ .handle = handle }; |
| 4317 | .handle = handle, | | |
| 4318 | .flags = .{ .nonblocking = false }, | | |
| 4319 | }; | | |
| 4320 | } | 4303 | } |
| 4321 | | 4304 | |
| 4322 | fn dirOpenFileWasi( | 4305 | fn dirOpenFileWasi( |
| ... | @@ -8271,7 +8254,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us | ... | @@ -8271,7 +8254,7 @@ fn fileReadStreamingWindows(file: File, data: []const []u8) File.Reader.Error!us |
| 8271 | try syscall.checkCancel(); | 8254 | try syscall.checkCancel(); |
| 8272 | continue; | 8255 | continue; |
| 8273 | }, | 8256 | }, |
| 8274 | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // wrong value for flags.nonblocking | 8257 | .INVALID_PARAMETER => |err| return syscall.ntstatusBug(err), // streaming read of async mode file |
| 8275 | else => |status| return syscall.unexpectedNtstatus(status), | 8258 | else => |status| return syscall.unexpectedNtstatus(status), |
| 8276 | } | 8259 | } |
| 8277 | } | 8260 | } |
| ... | @@ -14363,9 +14346,9 @@ fn processSpawnWindows(userdata: ?*anyopaque, options: process.SpawnOptions) pro | ... | @@ -14363,9 +14346,9 @@ fn processSpawnWindows(userdata: ?*anyopaque, options: process.SpawnOptions) pro |
| 14363 | return .{ | 14346 | return .{ |
| 14364 | .id = piProcInfo.hProcess, | 14347 | .id = piProcInfo.hProcess, |
| 14365 | .thread_handle = piProcInfo.hThread, | 14348 | .thread_handle = piProcInfo.hThread, |
| 14366 | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, | 14349 | .stdin = if (g_hChildStd_IN_Wr) |h| .{ .handle = h } else null, |
| 14367 | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, | 14350 | .stdout = if (g_hChildStd_OUT_Rd) |h| .{ .handle = h } else null, |
| 14368 | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h, .flags = .{ .nonblocking = true } } else null, | 14351 | .stderr = if (g_hChildStd_ERR_Rd) |h| .{ .handle = h } else null, |
| 14369 | .request_resource_usage_statistics = options.request_resource_usage_statistics, | 14352 | .request_resource_usage_statistics = options.request_resource_usage_statistics, |
| 14370 | }; | 14353 | }; |
| 14371 | } | 14354 | } |
| ... | @@ -15499,7 +15482,6 @@ fn progressParentFile(userdata: ?*anyopaque) std.Progress.ParentFileError!File { | ... | @@ -15499,7 +15482,6 @@ fn progressParentFile(userdata: ?*anyopaque) std.Progress.ParentFileError!File { |
| 15499 | .pointer => @ptrFromInt(int), | 15482 | .pointer => @ptrFromInt(int), |
| 15500 | else => return error.UnsupportedOperation, | 15483 | else => return error.UnsupportedOperation, |
| 15501 | }, | 15484 | }, |
| 15502 | .flags = if (is_windows) .{ .nonblocking = true } else .{}, | | |
| 15503 | }; | 15485 | }; |
| 15504 | } | 15486 | } |
| 15505 | | 15487 | |