fd_util: added O_NONBLOCK functions

Changed the wrappers for pipe(), socket(), accept().  On WIN32, this
does not work for pipe().
This commit is contained in:
Max Kellermann
2009-11-08 22:11:35 +01:00
parent b043ade456
commit f66edccffd
6 changed files with 55 additions and 26 deletions

View File

@@ -195,7 +195,8 @@ httpd_listen_in_event(G_GNUC_UNUSED GIOChannel *source,
/* the listener socket has become readable - a client has
connected */
fd = accept_cloexec(httpd->fd, (struct sockaddr*)&sa, &sa_length);
fd = accept_cloexec_nonblock(httpd->fd, (struct sockaddr*)&sa,
&sa_length);
if (fd >= 0) {
/* can we allow additional client */
if (httpd->open &&