summaryrefslogtreecommitdiffstats
path: root/process.cpp
diff options
context:
space:
mode:
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)