* fhandler_socket.cc (fhandler_socket::set_close_on_exec): Only call

fhandler_base::set_close_on_exec for inheritable sockets.
This commit is contained in:
Corinna Vinschen 2009-11-23 12:21:39 +00:00
parent 83fb2eceda
commit 013e402bfc
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-11-23 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::set_close_on_exec): Only call
fhandler_base::set_close_on_exec for inheritable sockets.
2009-11-21 Corinna Vinschen <corinna@vinschen.de> 2009-11-21 Corinna Vinschen <corinna@vinschen.de>
* globals.cc (ro_u_dll): New R/O unicode string. * globals.cc (ro_u_dll): New R/O unicode string.

View File

@ -2034,9 +2034,14 @@ fhandler_socket::set_close_on_exec (bool val)
{ {
set_no_inheritance (wsock_mtx, val); set_no_inheritance (wsock_mtx, val);
set_no_inheritance (wsock_evt, val); set_no_inheritance (wsock_evt, val);
fhandler_base::set_close_on_exec (val); if (need_fixup_before ())
{
close_on_exec (val);
debug_printf ("set close_on_exec for %s to %d", get_name (), val); debug_printf ("set close_on_exec for %s to %d", get_name (), val);
} }
else
fhandler_base::set_close_on_exec (val);
}
void void
fhandler_socket::set_sun_path (const char *path) fhandler_socket::set_sun_path (const char *path)