summaryrefslogtreecommitdiffstats
path: root/process.cpp
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@digia.com>2014-07-28 13:10:23 +0200
committerRainer Keller <rainer.keller@digia.com>2014-08-14 09:28:38 +0300
commit224cdd83d41d659ec166f7177a549d391ed1d5cc (patch)
tree2ec6c8e09e362dd2a179db75985288b4e9d2efd4 /process.cpp
parenta6a806bc5e34dfaad1a39fffb237838f2f70a484 (diff)
Always create a process group and session
Task-number: QTEE-641 Change-Id: Id2476d51834f29be8f7628f61642f9f9d552ccda Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Diffstat (limited to 'process.cpp')
-rw-r--r--process.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/process.cpp b/process.cpp
index abf3eab..0584ccf 100644
--- a/process.cpp
+++ b/process.cpp
@@ -222,12 +222,14 @@ void Process::stop()
if (kill(mDebuggee, SIGKILL) != 0)
perror("Could not kill debugee");
}
- if (kill(-getpid(), SIGTERM) != 0)
- perror("Could not kill process group");
mProcess->terminate();
if (!mProcess->waitForFinished())
mProcess->kill();
+
+ // Just for completeness terminate the whole group
+ // in case the application has started subprocesses
+ ::kill(-getpid(), SIGTERM);
}
void Process::incomingConnection(int i)