aboutsummaryrefslogtreecommitdiffhomepage
path: root/env_universal.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-07 12:40:08 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-07 12:40:08 -0700
commit437b4397b9cf273922ce7b414bf6626845f15ad0 (patch)
tree8c5fbb6a7196146b5656629f8c37f4eb1d3ecd80 /env_universal.cpp
parent3a7ab3f030eda29ecbe54c0f44732e471300a3ed (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.cpp2
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);