diff options
| author | Veikka Tuominen <git@vexu.eu> | 2024-01-28 01:04:38 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2024-02-01 15:22:36 +0200 |
| commit | a4f27e8987ef3e2388839b6452b9f485ab82e7b7 (patch) | |
| tree | 6420c218896c0f44dea7353b8a9c00b01461c2ec /lib/std/child_process.zig | |
| parent | b0bea72588c685c1d6439f61d2e842756b5fc496 (diff) | |
| download | zig-a4f27e8987ef3e2388839b6452b9f485ab82e7b7.tar.gz zig-a4f27e8987ef3e2388839b6452b9f485ab82e7b7.zip | |
remove std.io.Mode
Diffstat (limited to 'lib/std/child_process.zig')
| -rw-r--r-- | lib/std/child_process.zig | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/std/child_process.zig b/lib/std/child_process.zig index 0a0c06ff89..6fecc4fd65 100644 --- a/lib/std/child_process.zig +++ b/lib/std/child_process.zig @@ -493,7 +493,7 @@ pub const ChildProcess = struct { } fn spawnPosix(self: *ChildProcess) SpawnError!void { - const pipe_flags = if (io.is_async) os.O.NONBLOCK else 0; + const pipe_flags = 0; const stdin_pipe = if (self.stdin_behavior == StdIo.Pipe) try os.pipe2(pipe_flags) else undefined; errdefer if (self.stdin_behavior == StdIo.Pipe) { destroyPipe(stdin_pipe); @@ -665,7 +665,6 @@ pub const ChildProcess = struct { .share_access = windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE, .sa = &saAttr, .creation = windows.OPEN_EXISTING, - .io_mode = .blocking, }) catch |err| switch (err) { error.PathAlreadyExists => unreachable, // not possible for "NUL" error.PipeBusy => unreachable, // not possible for "NUL" @@ -1491,20 +1490,12 @@ fn forkChildErrReport(fd: i32, err: ChildProcess.SpawnError) noreturn { const ErrInt = std.meta.Int(.unsigned, @sizeOf(anyerror) * 8); fn writeIntFd(fd: i32, value: ErrInt) !void { - const file = File{ - .handle = fd, - .capable_io_mode = .blocking, - .intended_io_mode = .blocking, - }; + const file = File{ .handle = fd }; file.writer().writeInt(u64, @intCast(value), .little) catch return error.SystemResources; } fn readIntFd(fd: i32) !ErrInt { - const file = File{ - .handle = fd, - .capable_io_mode = .blocking, - .intended_io_mode = .blocking, - }; + const file = File{ .handle = fd }; return @as(ErrInt, @intCast(file.reader().readInt(u64, .little) catch return error.SystemResources)); } |
