jimingham wrote:

We'd have to make the change and see to be sure, but what I would expect is 
that if any other thread tried to call Kill while whoever is the currently the 
primary process listener is handling the stop, it would immediately fail 
because the process is not stopped.  Right now, the Kill is sometimes allowed 
because the public state is "stopped" even though we haven't actually finished 
handling the stop event.  So I think what I was suggesting will fix the 
original problem.

The race Pavel is pointing out also seems real to me, but that should be fixed 
at the source, rather than after the fact. Process::HijackProcessEvents should 
check the previous "primary event listener" to see if it has any events and if 
so they should be transferred to the Hijack Listener.  We should also do the 
same thing in RestoreProcessEvents.  That way we'll never drop an event when 
shuffling primary listeners.

 

https://github.com/llvm/llvm-project/pull/144919
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to