this repo has no description
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: do not close /dev/tty on macos

Attempting to close /dev/tty may block indefinitely on macos if another
thread is already blocked on a read operation. As there is no practical
use for closing /dev/tty on exit besides unblocking other threads (which
does not work on macos anyway) we can just skip the close call.

authored by

CJ van den Berg and committed by
Tim Culverhouse
1c113337 55809160

+2 -1
+2 -1
src/Tty.zig
··· 73 73 posix.tcsetattr(self.fd, .FLUSH, self.termios) catch |err| { 74 74 log.err("couldn't restore terminal: {}", .{err}); 75 75 }; 76 - posix.close(self.fd); 76 + if (builtin.os.tag != .macos) // closing /dev/tty may block indefinitely on macos 77 + posix.close(self.fd); 77 78 } 78 79 79 80 /// stops the run loop