Answer: C non-blocking keyboard input

answer re: C non-blocking keyboard input Jan 15 '09 77 As already stated, you can use sigaction to trap ctrl-c, or select to trap any standard input. Note however that with the latter method you also need to set the TTY so that it's in character-at-a-time rather than line-at-a-time mode. The latter is the default - if you type in… Open Full Answer

Feb 14, 2025 - 10:28
 0
Answer: C non-blocking keyboard input

As already stated, you can use sigaction to trap ctrl-c, or select to trap any standard input.

Note however that with the latter method you also need to set the TTY so that it's in character-at-a-time rather than line-at-a-time mode. The latter is the default - if you type in…