This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 844e7681de3f93f48516f69c5839a5fc7aeb9b50
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 b6dec3e..09aeb4f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -403,6 +403,7 @@ x2goclient (4.0.5.2-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.
   * debian/control:
     - Maintainer change in package: X2Go Developers <x2go-...@lists.x2go.org>.
     - Uploaders: add myself. Also, force a rebuild due to the changed
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

Reply via email to