~aritra1911/ansi_anim

5ce07270c179a8a173957fbf77ff3dea97048983 — Aritra Sarkar 2 years ago 949dcad
Turn off SIGINT and SIGSTP
1 files changed, 6 insertions(+), 2 deletions(-)

M main.c
M main.c => main.c +6 -2
@@ 18,8 18,12 @@ static inline void enable_raw_mode(void)
    tcgetattr(STDIN_FILENO, &orig_termios);
    raw = orig_termios;

    /* turn off echoing and canonical mode */
    raw.c_lflag &= ~(ECHO | ICANON);
    /* turn off a bunch of things:
     *      ECHO        : echoing of characters
     *      ICANON      : canonical mode (read byte-by-byte)
     *      ISIG        : signals like SIGINT (^C) and SIGSTP (^Z)
     */
    raw.c_lflag &= ~(ECHO | ICANON | ISIG);

    tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}