Skip to content

Commit

Permalink
Use fcntl to automatically close fishd socken on exec instead of hand…
Browse files Browse the repository at this point in the history
…ling it manually

darcs-hash:20061115111857-ac50b-3e04a0bc16c8442bef02cf4a50777d4556b8eaa6.gz
  • Loading branch information
liljencrantz committed Nov 15, 2006
1 parent 4768b37 commit d00bc97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion env_universal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 0 additions & 4 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "sanity.h"
#include "expand.h"
#include "signal.h"
#include "env_universal.h"

#include "halloc.h"
#include "halloc_util.h"
Expand Down Expand Up @@ -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;

}
Expand Down

0 comments on commit d00bc97

Please sign in to comment.