PDA

View Full Version : QProcess and Kdesu



L.Marvell
15th August 2006, 13:35
Have some question.

I start some command with Kdesu using QProcess.


QString program = "Kdesu";
QStringList arguments;
arguments << ...;
process->start(program, arguments);


How to terminate such process? If I do process->kill() it doesn't stop. AFAIU Kdesu starts command with root privileges, gets control to system and shuts down. Am I right?
The way I see is to find PID of running command and than process->("Kdesu", QStringList() << "-t" << "kill" << $pidOfCommand I didn't try it yet but I think it has to work. Maybe there is another/simpler method?

ball
16th August 2006, 04:21
Strange, qProcess->kill() should be able to terminate the command program completely.

How do you know the process is not yet killed?

L.Marvell
16th August 2006, 11:12
Strange, qProcess->kill() should be able to terminate the command program completely.

How do you know the process is not yet killed?
Started process creates package and if I want to terminate the job I press stop button which invoke process->kill() but package creates.