Skip to content

Commit

Permalink
Get maxima_pid from wxExecute().
Browse files Browse the repository at this point in the history
Until now, the pid was not set (and -1
was printed during the logging). This
(hopefully) helps with issues, where
the "not killing" of Maxima processes
was reported, e.g. #1199, #1824, #1922
or #1963.
  • Loading branch information
daute committed Oct 13, 2024
1 parent e87e09a commit e6601c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/wxMaxima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2691,9 +2691,8 @@ bool wxMaxima::StartMaxima(bool force) {
environment["MAXIMA_AUTH_CODE"] = m_maximaAuthString;

env->env = std::move(environment);
if (wxExecute(command, wxEXEC_ASYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_MAKE_GROUP_LEADER,
m_maximaProcess,
env.get()) <= 0) {
m_pid=wxExecute(command, wxEXEC_ASYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_MAKE_GROUP_LEADER, m_maximaProcess, env.get());
if (m_pid <= 0) {
StatusMaximaBusy(StatusBar::MaximaStatus::process_wont_start);
StatusText(_("Cannot start the maxima binary"));
m_maximaProcess = NULL;
Expand Down

0 comments on commit e6601c4

Please sign in to comment.