[boinc] 02/03: Fix launch of new instance
Gianfranco Costamagna
locutusofborg at moszumanska.debian.org
Wed Mar 15 16:26:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
locutusofborg pushed a commit to branch master
in repository boinc.
commit bb9c4d28d840a31da338533c3afa1527046b18a2
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Wed Mar 15 17:23:39 2017 +0100
Fix launch of new instance
---
debian/patches/boinc-issue-1177.patch | 47 ++++++++++++++++++++++++++++++
debian/patches/fix-new-process-spawn.patch | 29 ------------------
debian/patches/series | 2 +-
3 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/debian/patches/boinc-issue-1177.patch b/debian/patches/boinc-issue-1177.patch
new file mode 100644
index 0000000..4daaccc
--- /dev/null
+++ b/debian/patches/boinc-issue-1177.patch
@@ -0,0 +1,47 @@
+Description: Fix for the new process spawn
+Author: Christian Beer
+
+Bug-Ubuntu: https://launchpad.net/bugs/1115607
+Forwarded: https://github.com/BOINC/boinc/issues/1177
+
+diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp
+index 434769b5e4..b5c0b8a45b 100644
+--- a/clientgui/BOINCGUIApp.cpp
++++ b/clientgui/BOINCGUIApp.cpp
+@@ -721,6 +721,17 @@ void CBOINCGUIApp::DetectExecutableName() {
+
+ // Store the root directory for later use.
+ m_strBOINCMGRExecutableName = pszProg;
++#else
++ char path[PATH_MAX];
++ memset(path,0,sizeof(path));
++ int ret = readlink("/proc/self/exe", path, PATH_MAX);
++ if ( ret >= 0) {
++ path[ret] = '\0'; // readlink does not null terminate
++ char* name = strrchr(path, '/') + 1;
++ m_strBOINCMGRExecutableName = name;
++ } else {
++ perror("readlink");
++ }
+ #endif
+ }
+
+@@ -742,6 +753,18 @@ void CBOINCGUIApp::DetectRootDirectory() {
+
+ // Store the root directory for later use.
+ m_strBOINCMGRRootDirectory = szPath;
++#else
++ char path[PATH_MAX];
++ memset(path,0,sizeof(path));
++ int ret = readlink("/proc/self/exe", path, PATH_MAX);
++ if ( ret >= 0) {
++ path[ret] = '\0'; // readlink does not null terminate
++ char* name = strrchr(path, '/') + 1;
++ *name = '\0';
++ m_strBOINCMGRRootDirectory = path;
++ } else {
++ perror("readlink");
++ }
+ #endif
+ }
+
diff --git a/debian/patches/fix-new-process-spawn.patch b/debian/patches/fix-new-process-spawn.patch
deleted file mode 100644
index c613eba..0000000
--- a/debian/patches/fix-new-process-spawn.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Description: "fix" the new process spawn
-Author: Gianfranco Costamagna <locutusofborg at debian.org>
- Christian Beer
-
-Bug-Ubuntu: https://launchpad.net/bugs/1115607
-Forwarded: https://github.com/BOINC/boinc/issues/1177
-
---- boinc-7.6.33+dfsg.orig/clientgui/AdvancedFrame.cpp
-+++ boinc-7.6.33+dfsg/clientgui/AdvancedFrame.cpp
-@@ -1586,7 +1586,7 @@ void CAdvancedFrame::OnLaunchNewInstance
- #endif
- int argc = 2;
- char* const argv[3] = {
-- const_cast<char *>("boincmgr"),
-+ const_cast<char *>("/usr/bin/boincmgr"),
- const_cast<char *>("--multiple"),
- NULL
- };
---- boinc-7.6.33+dfsg.orig/lib/util.cpp
-+++ boinc-7.6.33+dfsg/lib/util.cpp
-@@ -468,7 +468,7 @@ int run_program(
- retval = chdir(dir);
- if (retval) return retval;
- }
-- execv(file, argv);
-+ execv(argv[0], argv);
- #ifdef _USING_FCGI_
- FCGI::perror("execv");
- #else
diff --git a/debian/patches/series b/debian/patches/series
index fe9d5c9..a355079 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -35,4 +35,4 @@ e965ea2e32d467e6937f206c96270cabd381df6e.patch
1ec4be73d83d6041e4097b547a3fca297dd828db.patch
056f788ea3a9ba1b45e17bcacea91a38c1ed8d73.patch
7c2cb62aa3a119818e9ceab0d6358f4c910fb337.patch
-#fix-new-process-spawn.patch
+boinc-issue-1177.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git
More information about the pkg-boinc-commits
mailing list