[Lldb-commits] [PATCH] Add code to exit the NativeProcessLinux Monitor thread on android

Pavel Labath labath at google.com
Wed Mar 11 10:59:30 PDT 2015

I have an issue with one of the comments, but otherwise looks fine.

Comment at: source/Host/common/Host.cpp:146
@@ +145,3 @@
+#ifdef __linux__
+// Change it to a std::set with a mutex if multiple thread can be cancelled at the same time
+static pthread_t g_usr1_signal_thread = 0;
Please remove the std::set reference, as it is not a valid solution. There are very few things that can be done safely in a signal handler and std::set manipulation is not one of them. If we ever need to cancel multiple threads, we will need to do something more clever, probably set a flag on NativeProcessAndroid (outside of the signal handler), as @vharron suggseted.



More information about the lldb-commits mailing list