If you are happy just catching Control-C, it's a done deal. If you really want non-blocking I/O but you don't want the curses library, another alternative is to move lock, stock, and barrel to the AT&T sfio
library. It's nice library patterned on C stdio
but more flexible, thread-safe, and performs better. (sfio stands for safe, fast I/O.)