mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
Some initial changes to use CLO_EXEC, with an eye towards some day using it correctly.
This commit is contained in:
8
fish.cpp
8
fish.cpp
@@ -326,13 +326,17 @@ int main( int argc, char **argv )
|
||||
int i;
|
||||
int fd;
|
||||
wchar_t *rel_filename, *abs_filename;
|
||||
|
||||
|
||||
|
||||
if( ( fd = open(file, O_RDONLY) ) == -1 )
|
||||
{
|
||||
wperror( L"open" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// OK to not do this atomically since we cannot have gone multithreaded yet
|
||||
set_cloexec(fd);
|
||||
|
||||
if( *(argv+my_optind))
|
||||
{
|
||||
wcstring sb;
|
||||
|
||||
Reference in New Issue
Block a user