fd_util: added missing NONBLOCK fallback for socket()
This commit is contained in:
parent
223b0db5bd
commit
1a4025420c
@ -180,8 +180,10 @@ socket_cloexec_nonblock(int domain, int type, int protocol)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fd = socket(domain, type, protocol);
|
fd = socket(domain, type, protocol);
|
||||||
if (fd >= 0)
|
if (fd >= 0) {
|
||||||
fd_set_cloexec(fd, true);
|
fd_set_cloexec(fd, true);
|
||||||
|
fd_set_nonblock(fd);
|
||||||
|
}
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user