Skip to content

Commit

Permalink
Document a wxWidgets issue (killing processes with wxKill).
Browse files Browse the repository at this point in the history
That did only kill the direct child processes.
My solution (commit c957270)
should - hopefully - solve issues #1963, #1922 and #1824.
  • Loading branch information
daute committed Jan 12, 2025
1 parent 83630fb commit 4e3515e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wxMaxima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,11 @@ void wxMaxima::KillMaxima(bool logMessage) {
//
// However - that seems not work too. It either does not send wxSIGKILL (but another signal) to the children or
// only to the direct children and not their child processes. So use taskkill (/F: force, /T: treekill):
//
// I identified a wxWidgets issue, that only the direct children are killed:
// https://github.com/wxWidgets/wxWidgets/issues/25069
// Since it will take some time until wxWidgets distributions with this fix are released and in use,
// use the taskkill solution now.
wxArrayString taskkill_out, taskkill_err;
wxExecute(wxString::Format("taskkill /PID %d /F /T", m_pid), taskkill_out, taskkill_err, wxEXEC_SYNC);
for (size_t i=0; i<taskkill_out.GetCount(); ++i)
Expand Down

0 comments on commit 4e3515e

Please sign in to comment.