* fhandler.h class fhandler_socket): Declare new method

`set_close_on_exec'.
        * fhandler_socket.cc (fhandler_socket::set_close_on_exec):
        New method.
This commit is contained in:
Corinna Vinschen
2001-06-22 20:53:45 +00:00
parent 3b295174e3
commit 50b1264871
3 changed files with 17 additions and 0 deletions

View File

@ -431,3 +431,12 @@ fhandler_socket::fcntl (int cmd, void *arg)
return res;
}
void
fhandler_socket::set_close_on_exec (int val)
{
extern WSADATA wsadata;
if (wsadata.wVersion < 512) /* < Winsock 2.0 */
set_inheritance (get_handle (), val);
set_close_on_exec_flag (val);
debug_printf ("set close_on_exec for %s to %d", get_name (), val);
}