Skip to content

Commit

Permalink
tty: set termios ISIG = false and PARMRK = false
Browse files Browse the repository at this point in the history
When changing to the new zig termios api, I missed setting two flags.
This left SIGINTs being sent to the terminal and applications not able
to handle ctrl+c.
  • Loading branch information
rockorager committed Feb 27, 2024
1 parent 4069c83 commit f84bad6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Tty.zig
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub fn makeRaw(fd: os.fd_t) !os.termios {
// see termios(3)
raw.iflag.IGNBRK = false;
raw.iflag.BRKINT = false;
raw.iflag.PARMRK = false;
raw.iflag.ISTRIP = false;
raw.iflag.INLCR = false;
raw.iflag.IGNCR = false;
Expand All @@ -235,6 +236,7 @@ pub fn makeRaw(fd: os.fd_t) !os.termios {
raw.lflag.ECHO = false;
raw.lflag.ECHONL = false;
raw.lflag.ICANON = false;
raw.lflag.ISIG = false;
raw.lflag.IEXTEN = false;

raw.cflag.CSIZE = .CS8;
Expand Down

0 comments on commit f84bad6

Please sign in to comment.