You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The message of the title might happen repeatedly in the log (actually, each time a terminal window is closed) if I don't disable Qt warnings inside ~/.config/QtProject/qtlogging.ini. It's caused by these lines in the d-tor of KPtyProcess:
waitForFinished(300); // give it some time to finish
if (state() != QProcess::NotRunning)
{
qWarning() << Q_FUNC_INFO << "the terminal process is still running, trying to stop it by SIGHUP";
::kill(static_cast<pid_t>(processId()), SIGHUP);
waitForFinished(300);
if (state() != QProcess::NotRunning)
qCritical() << Q_FUNC_INFO << "process didn't stop upon SIGHUP and will be SIGKILL-ed";
}
Qt doc says that QProcess::~QProcess() will not return until the process is terminated.
IMO, waiting for the finished() signal inside the d-tor of a QProcess isn't OK. I checked KDE's kpty → kptyprocess.cpp. They either never used waitForFinished() there or removed it a long time ago. Will use QTerminal without it for a while to test…
The text was updated successfully, but these errors were encountered:
Oh, it was added here 4 years ago, by @palinek: #171. Without it, this message is shown instead: QProcess: Destroyed while process ("/bin/bash") is still running.
Maybe another method needs to be found, because Konsole doesn't have this problem.
Instead of trying to stop the process in the d-tor of `KPtyProcess`, the patch does it in the d-tor of `Session`.
I consulted Konsole's code — that didn't have our problem but was very different from our code — and adapted it to ours.
Closes#566
The message of the title might happen repeatedly in the log (actually, each time a terminal window is closed) if I don't disable Qt warnings inside
~/.config/QtProject/qtlogging.ini
. It's caused by these lines in the d-tor ofKPtyProcess
:qtermwidget/lib/kptyprocess.cpp
Lines 96 to 104 in df7297b
Qt doc says that
QProcess::~QProcess()
will not return until the process is terminated.IMO, waiting for the
finished()
signal inside the d-tor of aQProcess
isn't OK. I checked KDE'skpty
→kptyprocess.cpp
. They either never usedwaitForFinished()
there or removed it a long time ago.Will use QTerminal without it for a while to test…The text was updated successfully, but these errors were encountered: