Commit 637544bd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Set close-on-exec flag on sockets so that we don't pass them to CGI scripts

parent c397800d
......@@ -77,6 +77,8 @@ int net_Socket( vlc_object_t *p_this, int i_family, int i_socktype,
msg_Err( p_this, "cannot set socket to non-blocking mode" );
}
#else
fcntl( fd, F_SETFD, FD_CLOEXEC );
if( ( ( i_val = fcntl( fd, F_GETFL, 0 ) ) < 0 ) ||
( fcntl( fd, F_SETFL, i_val | O_NONBLOCK ) < 0 ) )
msg_Err( p_this, "cannot set socket to non-blocking mode (%s)",
......
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