* 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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user