DebugAdapterClient/DapProcess.cpp
raw| 1 | #include "DapProcess.hpp" |
| 2 | |
| 3 | DapProcess::DapProcess(wxEvtHandler* notifier) |
| 4 | : m_notifier(notifier) |
| 5 | { |
| 6 | } |
| 7 | |
| 8 | DapProcess::~DapProcess() {} |
| 9 | |
| 10 | void DapProcess::OnTerminate(int pid, int status) |
| 11 | { |
| 12 | if(m_notifier) { |
| 13 | wxProcessEvent event_terminated{ wxEVT_END_PROCESS }; |
| 14 | event_terminated.m_pid = pid; |
| 15 | event_terminated.m_exitcode = status; |
| 16 | m_notifier->AddPendingEvent(event_terminated); |
| 17 | } |
| 18 | delete this; |
| 19 | } |