summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Target/Process.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 9cbefffc82a..63a336551a0 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2561,8 +2561,16 @@ Process::Launch (const ProcessLaunchInfo &launch_info)
SetPublicState (eStateLaunching);
m_should_detach = false;
- // Now launch using these arguments.
- error = DoLaunch (exe_module, launch_info);
+ if (m_run_lock.WriteTryLock())
+ {
+ // Now launch using these arguments.
+ error = DoLaunch (exe_module, launch_info);
+ }
+ else
+ {
+ // This shouldn't happen
+ error.SetErrorString("failed to acquire process run lock");
+ }
if (error.Fail())
{
OpenPOWER on IntegriCloud