socket connections have close-on-exit bit set
This commit is contained in:
parent
e2ce7103aa
commit
226ef47beb
|
|
@ -115,6 +115,9 @@ private:
|
||||||
// turn socket into a non-blocking socket
|
// turn socket into a non-blocking socket
|
||||||
fcntl(_socket, F_SETFL, O_NONBLOCK);
|
fcntl(_socket, F_SETFL, O_NONBLOCK);
|
||||||
|
|
||||||
|
// switch on the close-on-exec bit
|
||||||
|
fcntl(_socket, F_SETFL, O_CLOEXEC);
|
||||||
|
|
||||||
// we want to enable "nodelay" on sockets (otherwise all send operations are s-l-o-w
|
// we want to enable "nodelay" on sockets (otherwise all send operations are s-l-o-w
|
||||||
int optval = 1;
|
int optval = 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue