From c8b38d3389d8c52aa32d30a97dabe60f9aeda9a5 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Wed, 4 Dec 2013 19:38:57 +0000 Subject: [PATCH] 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 --- lldb/source/Host/macosx/Host.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm index 2d5027161798..f4b8203ca6ca 100644 --- a/lldb/source/Host/macosx/Host.mm +++ b/lldb/source/Host/macosx/Host.mm @@ -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; }