diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 12:40:08 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 12:40:08 -0700 |
commit | 437b4397b9cf273922ce7b414bf6626845f15ad0 (patch) | |
tree | 8c5fbb6a7196146b5656629f8c37f4eb1d3ecd80 /env_universal.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 'env_universal.cpp')
-rw-r--r-- | env_universal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/env_universal.cpp b/env_universal.cpp index 5fcd97a6..c7d060ad 100644 --- a/env_universal.cpp +++ b/env_universal.cpp @@ -135,7 +135,7 @@ static int try_get_socket_once(void) return -1; } - if ((fcntl(s, F_SETFL, O_NONBLOCK) != 0) || (fcntl(s, F_SETFD, FD_CLOEXEC) != 0)) + if ((make_fd_nonblocking(s) != 0) || (fcntl(s, F_SETFD, FD_CLOEXEC) != 0)) { wperror(L"fcntl"); close(s); |