commit 52fb224d500479062c769ef10bdb0cb74ab483b8
parent a01de4d7361a44f73edfa70628176fb086885119
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Thu, 14 Apr 2016 10:20:19 +0000
Make pipe non-blocking for tread pool
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -4289,6 +4289,17 @@ MHD_start_daemon_va (unsigned int flags,
#endif
goto thread_failed;
}
+ if (MHD_NO == make_nonblocking (d, d->wpipe[0]))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ "Failed to make worker control pipe non_blocking: %s\n",
+ MHD_pipe_last_strerror_() );
+#endif
+
+ goto thread_failed;
+ }
+ make_nonblocking (d, d->wpipe[1]);
#ifndef MHD_WINSOCK_SOCKETS
if ( (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL_LINUX_ONLY))) &&
(MHD_USE_SUSPEND_RESUME == (flags & MHD_USE_SUSPEND_RESUME)) &&