mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +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;
|
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" );
|
wperror( L"fcntl" );
|
||||||
close( s );
|
close( s );
|
||||||
|
|
4
exec.c
4
exec.c
|
@ -42,7 +42,6 @@
|
||||||
#include "sanity.h"
|
#include "sanity.h"
|
||||||
#include "expand.h"
|
#include "expand.h"
|
||||||
#include "signal.h"
|
#include "signal.h"
|
||||||
#include "env_universal.h"
|
|
||||||
|
|
||||||
#include "halloc.h"
|
#include "halloc.h"
|
||||||
#include "halloc_util.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;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue