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

@@ -103,7 +103,7 @@ socket_bind_listen(int domain, int type, int protocol,
int passcred = 1;
#endif
fd = socket_cloexec(domain, type, protocol);
fd = socket_cloexec_nonblock(domain, type, protocol);
if (fd < 0) {
g_set_error(error, listen_quark(), errno,
"Failed to create socket: %s", g_strerror(errno));