From c7d21ae2b834bd101d8dba1edaea05edcdb6e8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 13 Apr 2017 12:05:55 +0200 Subject: [PATCH] use KProcess instead of QProcess to launch apps in ksmserver Follow-up to the previous commit. KProcess has saner defaults for simply launching an app and being done with it, no lost stdout/stderr or even SIGPIPE. CCBUG: 369391 CCBUG: 370528 --- ksmserver/startup.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index 36bab54d9..53a627f4d 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -462,8 +462,9 @@ void KSMServer::runUserAutostart() const QString fullPath = dir.absolutePath() + QLatin1Char('/') + file; qCInfo(KSMSERVER) << "Starting autostart script " << fullPath; - auto p = new QProcess; //deleted in onFinished lambda - p->start(fullPath); + auto p = new KProcess; //deleted in onFinished lambda + p->setProgram(fullPath); + p->start(); connect(p, static_cast(&QProcess::finished), [p](int exitCode) { qCInfo(KSMSERVER) << "autostart script" << p->program() << "finished with exit code " << exitCode; p->deleteLater();