This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient.
commit 8fc340eb59ad3d5decf834a34a1eb5d701aaabaf Author: Mihai Moldovan <io...@ionic.de> Date: Sat Aug 13 23:33:15 2016 +0200 src/unixhelper.cpp: code cleanup. --- debian/changelog | 1 + src/unixhelper.cpp | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3d1e696..0a97c9a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -370,6 +370,7 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium cleanup process doesn't kill itself before all other processes in the process group are killed. - src/pulsemanager.cpp: remove unused variables. + - src/unixhelper.cpp: code cleanup. -- X2Go Release Manager <git-ad...@x2go.org> Mon, 19 Sep 2016 09:07:07 +0200 diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp index 82e4374..d6b4993 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -31,7 +31,6 @@ #include <vector> #include <cstdlib> #include <stdio.h> -#include <string.h> /* For documentation please see unixhelper.h. */ @@ -60,8 +59,8 @@ namespace unixhelper { } /* Error. */ else if (-1 == tmp_pid) { - perror ("WARNING: unable to fork off another process to kill original process group"); - std::cerr << "Proceeding with normal operation, but process might kill itself before tree vanishes." << std::endl; + std::perror ("WARNING: unable to fork off another process to kill original process group"); + std::cerr << "Proceeding with normal operation, but process might kill itself before tree vanishes." << std::endl; real_kill_pgroup (pgid_to_kill); } @@ -72,7 +71,7 @@ namespace unixhelper { * spawn a bunch of new processes due to subsequent calls * to kill_pgroup () from unix_cleanup (). */ - exit (EXIT_SUCCESS); + std::exit (EXIT_SUCCESS); } } } @@ -96,13 +95,10 @@ namespace unixhelper { * Let's handle errors and exit, if necessary. */ if (0 != kill_ret) { - char err_str[512] = { }; - snprintf (err_str, 512, "WARNING: failed to kill process group '%d'", pgid); - - perror (err_str); + std::cerr << "WARNING: failed to kill process group '" << pgid << "': " << std::strerror (err_str) << std::endl; } - exit (EXIT_SUCCESS); + std::exit (EXIT_SUCCESS); } int unix_cleanup (const pid_t parent) { -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits