summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@kde.org>2017-04-13 10:05:55 (GMT)
committerLuboš Luňák <l.lunak@kde.org>2017-04-21 12:00:34 (GMT)
commitc7d21ae2b834bd101d8dba1edaea05edcdb6e8f5 (patch)
treecc3a2feacf7760b5c0ec94e3ebc74c7cee3eb149
parentda44dd6eae8b9ef4161680efcb9319a7267fe77e (diff)
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
-rw-r--r--ksmserver/startup.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp
index 36bab54..53a627f 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<void (QProcess::*)(int)>(&QProcess::finished), [p](int exitCode) {
qCInfo(KSMSERVER) << "autostart script" << p->program() << "finished with exit code " << exitCode;
p->deleteLater();