Ejemplo n.º 1
0
 void OnTerminate(int pid, int status)
 {
     clProcessEvent terminateEvent(wxEVT_TERMINAL_EXIT);
     terminateEvent.SetString(m_uid);
     terminateEvent.SetInt(status); // pass the exit code
     m_sink->AddPendingEvent(terminateEvent);
     delete this;
 }
Ejemplo n.º 2
0
void TerminalEmulator::OnProcessTerminated(clProcessEvent& event)
{
    // Process terminated
    wxDELETE(m_process);
    m_pid = wxNOT_FOUND;
    // Notify that the terminal has terminated
    clCommandEvent terminateEvent(wxEVT_TERMINAL_COMMAND_EXIT);
    AddPendingEvent(terminateEvent);
}
Ejemplo n.º 3
0
    void OnTerminate(int pid, int status)
    {
        if(m_parent) {
            clCommandEvent terminateEvent(wxEVT_TERMINAL_COMMAND_EXIT);
            m_parent->AddPendingEvent(terminateEvent);
            m_parent->m_pid = wxNOT_FOUND;

            std::list<wxProcess*>::iterator iter =
                std::find_if(m_parent->m_myProcesses.begin(), m_parent->m_myProcesses.end(),
                             [&](wxProcess* proc) { return proc == this; });
            if(iter != m_parent->m_myProcesses.end()) { m_parent->m_myProcesses.erase(iter); }
            delete this;
        }
    }