From f84bad6420810f1a0505347c6a795c9fd801a346 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 26 Feb 2024 18:26:12 -0600 Subject: [PATCH] tty: set termios ISIG = false and PARMRK = false 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. --- src/Tty.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Tty.zig b/src/Tty.zig index a595059..796d9b9 100644 --- a/src/Tty.zig +++ b/src/Tty.zig @@ -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; @@ -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;