summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-11-14 14:49:21 +0200
committerKalle Viironen <kalle.viironen@digia.com>2014-11-14 14:49:51 +0200
commitfe76b7a6b182eb42a405f4b76bbabc6101f13f9a (patch)
treef7f2a90e30503d9be1456f3bc8c64451d077ef57
parent22d4670b58dcb64a47ee589fbe922cb30a3e506c (diff)
parent1dbc31296d393bb542b0a99f7047dcb13aae3ce3 (diff)
Merge branch 'stable' into dev
* stable: Revert "Always create a process group and session" Change copyright notice Change-Id: I0ecba1dc7d5eb62bc4f757d3de6fa64aa60572d5
-rw-r--r--main.cpp8
-rw-r--r--portlist.cpp4
-rw-r--r--portlist.h4
-rw-r--r--process.cpp10
-rw-r--r--process.h4
5 files changed, 14 insertions, 16 deletions
diff --git a/main.cpp b/main.cpp
index 51e69d1..3fa2a14 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://www.qt.io
**
** This file is part of QtEnterprise Embedded.
**
@@ -12,7 +12,7 @@
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://www.qt.io
**
****************************************************************************/
@@ -230,8 +230,6 @@ int main(int argc, char **argv)
return 1;
}
- ::setpgid(0,0); // must be called before setsid()
- ::setsid();
Config config = parseConfigFile();
while (!args.isEmpty()) {
@@ -249,6 +247,8 @@ int main(int argc, char **argv)
}
} else if (arg == "--debug-gdb") {
useGDB = true;
+ setpgid(0,0); // must be called before setsid()
+ setsid();
} else if (arg == "--debug-qml") {
useQML = true;
} else if (arg == "--stop") {
diff --git a/portlist.cpp b/portlist.cpp
index e0258c9..34488ef 100644
--- a/portlist.cpp
+++ b/portlist.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://www.qt.io
**
** This file is part of QtEnterprise Embedded.
**
@@ -12,7 +12,7 @@
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://www.qt.io
**
****************************************************************************/
diff --git a/portlist.h b/portlist.h
index 4846bf0..5784d94 100644
--- a/portlist.h
+++ b/portlist.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://www.qt.io
**
** This file is part of QtEnterprise Embedded.
**
@@ -12,7 +12,7 @@
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://www.qt.io
**
****************************************************************************/
diff --git a/process.cpp b/process.cpp
index 0584ccf..b7e7342 100644
--- a/process.cpp
+++ b/process.cpp
@@ -2,7 +2,7 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://www.qt.io
**
** This file is part of QtEnterprise Embedded.
**
@@ -12,7 +12,7 @@
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://www.qt.io
**
****************************************************************************/
@@ -222,14 +222,12 @@ 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)
diff --git a/process.h b/process.h
index 290fde4..781c121 100644
--- a/process.h
+++ b/process.h
@@ -2,7 +2,7 @@
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
+** For any questions to Digia, please use contact form at http://www.qt.io
**
** This file is part of QtEnterprise Embedded.
**
@@ -12,7 +12,7 @@
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
+** contact form at http://www.qt.io
**
****************************************************************************/