···3535 var handler_mutex: std.Thread.Mutex = .{};
3636 var handler_idx: usize = 0;
37373838+ /// global tty instance, used in case of a panic. Not guaranteed to work if
3939+ /// for some reason there are multiple TTYs open under a single vaxis
4040+ /// compilation unit - but this is better than nothing
4141+ pub var global_tty: ?PosixTty = null;
4242+3843 /// initializes a Tty instance by opening /dev/tty and "making it raw". A
3944 /// signal handler is installed for SIGWINCH. No callbacks are installed, be
4045 /// sure to register a callback when initializing the event loop
···5661 };
5762 try posix.sigaction(posix.SIG.WINCH, &act, null);
58635959- return .{
6464+ const self: PosixTty = .{
6065 .fd = fd,
6166 .termios = termios,
6267 };
6868+6969+ global_tty = self;
7070+7171+ return self;
6372 }
64736574 /// release resources associated with the Tty return it to its original state