[Lldb-commits] [PATCH] Fix race condition with -o "process launch" on linux

Pavel Labath labath at google.com
Thu Mar 5 11:10:28 PST 2015


================
Comment at: source/Plugins/Platform/Linux/PlatformLinux.cpp:804
@@ -803,3 +801,2 @@
             const StateType state = process_sp->WaitForProcessToStop (NULL, NULL, false, listener_sp.get());
-            process_sp->RestoreProcessEvents();
 
----------------
clayborg wrote:
> If you hijack event above, you must unhijack by calling:
> 
> 
> ```
> process_sp->RestoreProcessEvents();
> ```
> 
> So you can't remove this. It was a NOP before because it wasn't doing anything, but if you do hijack events, then you must unhijack.
Ok, this sure does look dodgy when you look at it alone. :)
This hijacking will be restored later in Target::Launch (line 2689). I believe it is expected behavior for the DebugProcess function to exit with event hijacking on. For example, the base Platform::DebugProcess also hijacks events on line 1188, but does not restore it by itself.

http://reviews.llvm.org/D8079

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list