diff options
author | 2016-11-27 17:33:38 +0200 | |
---|---|---|
committer | 2016-11-28 21:16:09 +0200 | |
commit | a682354d57e94e92947119a6c14fe933195bdcff (patch) | |
tree | b671ae60df25e1b001b44fea0c7fdd97edc327c6 /src | |
parent | 857567594e73b1e4febd64693a70343074c0cacc (diff) |
fix trex-277
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
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); } |