This revision was automatically updated to reflect the committed changes. Closed by commit rGaed179f5f557: [lldb] [Process/FreeBSD] Do not send SIGSTOP to stopped process (authored by mgorny). Herald added a project: LLDB.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126770/new/ https://reviews.llvm.org/D126770 Files: lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp Index: lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp =================================================================== --- lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp +++ lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp @@ -497,6 +497,10 @@ Status NativeProcessFreeBSD::Halt() { Status error; + // Do not try to stop a process that's already stopped, this may cause + // the SIGSTOP to get queued and stop the process again once resumed. + if (StateIsStoppedState(m_state, false)) + return error; if (kill(GetID(), SIGSTOP) != 0) error.SetErrorToErrno(); return error;
Index: lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp =================================================================== --- lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp +++ lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp @@ -497,6 +497,10 @@ Status NativeProcessFreeBSD::Halt() { Status error; + // Do not try to stop a process that's already stopped, this may cause + // the SIGSTOP to get queued and stop the process again once resumed. + if (StateIsStoppedState(m_state, false)) + return error; if (kill(GetID(), SIGSTOP) != 0) error.SetErrorToErrno(); return error;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits