Commit bb969f81 authored by Kai Vehmanen's avatar Kai Vehmanen

Make sure sockets are in nonblocking mode. Use FD_CLOEXEC to make sure sockets...

Make sure sockets are in nonblocking mode. Use FD_CLOEXEC to make sure sockets are closed upon exec().

darcs-hash:20070911172120-77cd4-458cd813975e5f23b6ff6d14860350c069836584.gz
parent f15b01a2
......@@ -147,6 +147,12 @@ socket_factory_init_socket (
}
#endif
#ifdef FD_CLOEXEC
fcntl (fd, F_SETFD, fcntl (fd, F_GETFD) | FD_CLOEXEC);
#endif
#ifdef O_NONBLOCK
fcntl (fd, F_SETFL, fcntl (fd, F_GETFL) | O_NONBLOCK);
#endif
if (addr != NULL)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment