diff --git a/env_universal.c b/env_universal.c index c3e5cd907..a069be948 100644 --- a/env_universal.c +++ b/env_universal.c @@ -144,7 +144,7 @@ static int get_socket( int fork_ok ) return -1; } - if( fcntl( s, F_SETFL, O_NONBLOCK ) != 0 ) + if( (fcntl( s, F_SETFL, O_NONBLOCK ) != 0) || (fcntl( s, F_SETFD, FD_CLOEXEC ) != 0) ) { wperror( L"fcntl" ); close( s ); diff --git a/exec.c b/exec.c index 2eecaf33a..b7166ee9b 100644 --- a/exec.c +++ b/exec.c @@ -42,7 +42,6 @@ #include "sanity.h" #include "expand.h" #include "signal.h" -#include "env_universal.h" #include "halloc.h" #include "halloc_util.h" @@ -388,9 +387,6 @@ static int handle_child_io( io_data_t *io, int exit_on_error ) } } - if( env_universal_server.fd >= 0 ) - exec_close( env_universal_server.fd ); - return 0; }