Author: gclayton
Date: Wed Dec 4 13:38:57 2013
New Revision: 196404
URL: http://llvm.org/viewvc/llvm-project?rev=196404&view=rev
Log:
Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available when
using posix_spawn to spawn processes to close all file handles.
Modified:
lldb/trunk/source/Host/macosx/Host.mm
Modified: lldb/trunk/source/Host/macosx/Host.mm
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=196404&r1=196403&r2=196404&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Wed Dec 4 13:38:57 2013
@@ -1329,10 +1329,10 @@ GetPosixspawnFlags (ProcessLaunchInfo &l
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;
}
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits