forked from OSchip/llvm-project
Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available when using posix_spawn to spawn processes to close all file handles.
llvm-svn: 196404
This commit is contained in:
parent
7749514293
commit
c8b38d3389
|
@ -1329,10 +1329,10 @@ GetPosixspawnFlags (ProcessLaunchInfo &launch_info)
|
|||
if (launch_info.GetLaunchInSeparateProcessGroup())
|
||||
flags |= POSIX_SPAWN_SETPGROUP;
|
||||
|
||||
//#ifdef POSIX_SPAWN_CLOEXEC_DEFAULT
|
||||
// // Close all files exception those with file actions if this is supported.
|
||||
// flags |= POSIX_SPAWN_CLOEXEC_DEFAULT;
|
||||
//#endif
|
||||
#ifdef POSIX_SPAWN_CLOEXEC_DEFAULT
|
||||
// Close all files exception those with file actions if this is supported.
|
||||
flags |= POSIX_SPAWN_CLOEXEC_DEFAULT;
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue