diff --git a/ksgrd/SensorShellAgent.cpp b/ksgrd/SensorShellAgent.cpp --- a/ksgrd/SensorShellAgent.cpp +++ b/ksgrd/SensorShellAgent.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "ksgrd_debug.h" #include "SensorManager.h" @@ -68,6 +69,8 @@ connect( mDaemon.data(), &QProcess::readyReadStandardError, this, &SensorShellAgent::errMsgRcvd ); + if (!QStandardPaths::findExecutable("setsid").isEmpty()) + *mDaemon << "setsid" << "-w" << "--"; if ( !command.isEmpty() ) { *mDaemon << KShell::splitArgs(command); }