From a682354d57e94e92947119a6c14fe933195bdcff Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 27 Nov 2016 17:33:38 +0200 Subject: [PATCH] fix trex-277 Signed-off-by: Hanoh Haim --- src/utl_term_io.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.16.6