When the Platform launches a process for debugging, make sure it goes into a separate process group, otherwise ^C will both cause us to try to Stop it manually, AND send it a SIGINT, which can confuse us.
rdar://problem/11369230
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157791 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Platform.cpp b/source/Target/Platform.cpp
index 3334378..79fdfff 100644
--- a/source/Target/Platform.cpp
+++ b/source/Target/Platform.cpp
@@ -605,6 +605,11 @@
ProcessSP process_sp;
// Make sure we stop at the entry point
launch_info.GetFlags ().Set (eLaunchFlagDebug);
+ // We always launch the process we are going to debug in a separate process
+ // group, since then we can handle ^C interrupts ourselves w/o having to worry
+ // about the target getting them as well.
+ launch_info.SetLaunchInSeparateProcessGroup(true);
+
error = LaunchProcess (launch_info);
if (error.Success())
{