38#ifndef MAXIMAPROCESSMANAGER_H
39#define MAXIMAPROCESSMANAGER_H
59 m_itemTimer.Bind(wxEVT_TIMER, &MaximaProcessManager::OnItemTimer,
this);
163 bool m_inMaximaEvent =
false;
176 void OnItemTimer(wxTimerEvent &event);
184 static constexpr int ItemBudgetMs = 50;
191 bool m_skipOutputUntilPrompt =
false;
193 long m_skippedOutputItems = 0;
195 void ReportSkippedOutput();
The Maxima process/socket lifecycle extracted from the wxMaxima god class.
Definition: MaximaProcessManager.h:56
void ServerEvent(wxSocketEvent &event)
Handles a socket event on the server: on a connection, accepts it.
Definition: MaximaProcessManager.cpp:143
bool StartServer()
Opens the local socket server Maxima connects back to. Returns false if no server could be created.
Definition: MaximaProcessManager.cpp:203
void OnMaximaConnect()
Accepts Maxima's connection to our server socket, wires up the data stream and kicks off the initial ...
Definition: MaximaProcessManager.cpp:155
void OnGnuplotClose(wxProcessEvent &event)
wxEVT_END_PROCESS handler for the gnuplot subprocess: notes it has closed.
Definition: MaximaProcessManager.cpp:1200
static void RegisterChildMaxima(long pid)
Remember a running child Maxima's (group-leader) PID so a signal/crash handler can kill it....
Definition: MaximaProcessManager.cpp:83
void OnGnuplotPopoutCheckClose(wxProcessEvent &event)
wxEVT_END_PROCESS handler for the hidden, headless gnuplot check that runs alongside "Pop out interac...
Definition: MaximaProcessManager.cpp:1206
static void UnregisterChildMaxima(long pid)
Forget a child Maxima's PID once we have taken it down ourselves. Async-signal-safe; no-op on Windows...
Definition: MaximaProcessManager.cpp:98
static void KillAllChildMaximas()
SIGKILL every child Maxima we still have registered.
Definition: MaximaProcessManager.cpp:113
void KillMaxima(bool logMessage=true)
Kills the Maxima process (and cleans up its temp files / registered PID).
Definition: MaximaProcessManager.cpp:441
void Interrupt(wxCommandEvent &event)
Sends the running Maxima an interrupt (Ctrl+G / the interrupt button).
Definition: MaximaProcessManager.cpp:1052
bool StartMaxima(bool force=false)
(Re)starts the Maxima process (and its server socket) if needed.
Definition: MaximaProcessManager.cpp:260
static void SetupTerminationHandlers()
Install the SIGTERM/SIGINT/SIGHUP handlers that run KillAllChildMaximas() so a child Maxima is not or...
Definition: MaximaProcessManager.cpp:128
void OnMaximaClose()
Reacts to the Maxima process having exited (reports it and, unless we closed it on purpose,...
Definition: MaximaProcessManager.cpp:590
void MaximaEvent(wxThreadEvent &event)
The EVT_MAXIMA handler: classifies each chunk Maxima sent over the socket and hands it to the matchin...
Definition: MaximaProcessManager.cpp:776
void OnGnuplotQueryTerminals(wxProcessEvent &event)
wxEVT_END_PROCESS handler for the gnuplot terminal-query subprocess: reads which terminals gnuplot su...
Definition: MaximaProcessManager.cpp:1138
bool WriteToMaximaStdin(const wxString &line)
Writes one line of input to the Maxima process's stdin.
Definition: MaximaProcessManager.cpp:674
void GnuplotCommandName(const wxString &gnuplot)
Resolves the gnuplot executable path and (re)starts a background query of the graphics terminals it s...
Definition: MaximaProcessManager.cpp:1315
Definition: wxMaxima.h:76