Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp =================================================================== --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -3369,6 +3369,14 @@ assert(false && "Unexpected errno from sem_wait"); } + // nullptr as operation means the operation thread should exit + if (!monitor->m_operation) + { + // notify calling thread that operation is complete + sem_post(&monitor->m_operation_done); + break; + } + reinterpret_cast(monitor->m_operation)->Execute(monitor); // notify calling thread that operation is complete @@ -3573,7 +3581,7 @@ if (!m_operation_thread.IsJoinable()) return; - m_operation_thread.Cancel(); + DoOperation(nullptr); // nullptr as operation ask the operation thread to exit m_operation_thread.Join(nullptr); }