fd_util: added missing NONBLOCK fallback for socket()

This commit is contained in:
Max Kellermann 2009-11-08 22:24:02 +01:00
parent 223b0db5bd
commit 1a4025420c

View File

@ -180,8 +180,10 @@ socket_cloexec_nonblock(int domain, int type, int protocol)
#endif
fd = socket(domain, type, protocol);
if (fd >= 0)
if (fd >= 0) {
fd_set_cloexec(fd, true);
fd_set_nonblock(fd);
}
return fd;
}