tty: assume posix systems support posix.empty_sigset

It should be pretty safe to assume that posix.empty_sigset
is supported on most, if not all, posix systems. Individual
OSes that need a different default value may add a case to
the switch like macos.

This should open up support for most other posix systems.

closes #151
This commit is contained in:
CJ van den Berg 2025-01-14 16:45:33 +01:00 committed by Tim Culverhouse
parent 2237a7059e
commit bd0438a19c

View file

@ -59,9 +59,7 @@ pub const PosixTty = struct {
.handler = .{ .handler = PosixTty.handleWinch },
.mask = switch (builtin.os.tag) {
.macos => 0,
.linux => posix.empty_sigset,
.freebsd => posix.empty_sigset,
else => @compileError("os not supported"),
else => posix.empty_sigset,
},
.flags = 0,
};
@ -95,9 +93,7 @@ pub const PosixTty = struct {
.handler = .{ .handler = posix.SIG.DFL },
.mask = switch (builtin.os.tag) {
.macos => 0,
.linux => posix.empty_sigset,
.freebsd => posix.empty_sigset,
else => @compileError("os not supported"),
else => posix.empty_sigset,
},
.flags = 0,
};