mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Use fcntl to automatically close fishd socken on exec instead of handling it manually
darcs-hash:20061115111857-ac50b-3e04a0bc16c8442bef02cf4a50777d4556b8eaa6.gz
This commit is contained in:
parent
4768b37531
commit
d00bc973fe
2 changed files with 1 additions and 5 deletions
|
@ -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 );
|
||||
|
|
4
exec.c
4
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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue