diff options
author | 2013-04-07 12:40:08 -0700 | |
---|---|---|
committer | 2013-04-07 12:40:08 -0700 | |
commit | 437b4397b9cf273922ce7b414bf6626845f15ad0 (patch) | |
tree | 8c5fbb6a7196146b5656629f8c37f4eb1d3ecd80 /io.cpp | |
parent | 3a7ab3f030eda29ecbe54c0f44732e471300a3ed (diff) |
Mark stdin as nonblocking if we get EWOULDBLOCK, and before handing it off to child processes when either starting them or moving them to the foreground.
Diffstat (limited to 'io.cpp')
-rw-r--r-- | io.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -138,9 +138,7 @@ io_buffer_t *io_buffer_t::create(bool is_input, int fd) wperror(L"pipe"); success = false; } - else if (fcntl(buffer_redirect->pipe_fd[0], - F_SETFL, - O_NONBLOCK)) + else if (make_fd_nonblocking(buffer_redirect->pipe_fd[0]) != 0) { debug(1, PIPE_ERROR); wperror(L"fcntl"); |