diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/utl_term_io.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utl_term_io.cpp b/src/utl_term_io.cpp index 8e561188..e45aeebd 100755 --- a/src/utl_term_io.cpp +++ b/src/utl_term_io.cpp @@ -78,6 +78,13 @@ int utl_termio_init(){ atexit(exit_handler1); save_termio(); set_conio_terminal_mode(); + + /* stdout is non-blocking */ + int fd = fileno(stdout); + int f = fcntl(fd, F_GETFL, 0); + f |= O_NONBLOCK; + fcntl(fd, F_SETFL, f); + return (0); } |