Skip to content

Commit c15e185

Browse files
linusgalimpfard
authored andcommitted
Remove IO mode fields from std.fs.File
See: ziglang/zig@a4f27e8
1 parent 882d036 commit c15e185

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/main.zig

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -682,11 +682,7 @@ var signalHandlingData: ?struct {
682682
old_sigwinch: ?SystemCapabilities.Sigaction = null,
683683

684684
pub fn handleSignal(signo: i32) callconv(.C) void {
685-
var f = std.fs.File{
686-
.handle = signalHandlingData.?.pipe.write,
687-
.capable_io_mode = .blocking,
688-
.intended_io_mode = .blocking,
689-
};
685+
var f = std.fs.File{ .handle = signalHandlingData.?.pipe.write };
690686
f.writer().writeInt(i32, signo, .little) catch {};
691687
}
692688
} = null;
@@ -1286,11 +1282,7 @@ pub const Editor = struct {
12861282
if (!is_windows) {
12871283
if (pollfds[2].revents & SystemCapabilities.POLL_IN != 0) no_read: {
12881284
// A signal! Let's handle it.
1289-
var f = std.fs.File{
1290-
.handle = signalHandlingData.?.pipe.read,
1291-
.capable_io_mode = .blocking,
1292-
.intended_io_mode = .blocking,
1293-
};
1285+
var f = std.fs.File{ .handle = signalHandlingData.?.pipe.read };
12941286
const signo = f.reader().readInt(i32, .little) catch {
12951287
break :no_read;
12961288
};

0 commit comments

Comments
 (0)