[X2Go-Commits] [x2goclient] 22/25: unixhelper.{cpp, h}: raise sleeping time to two seconds and grace period to 10 seconds.

git-admin at x2go.org git-admin at x2go.org
Fri Mar 20 05:40:39 CET 2015


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

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

commit eba4177f4875068f5d00a5edb2dff67e87925beb
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Mar 18 21:08:46 2015 +0100

    unixhelper.{cpp,h}: raise sleeping time to two seconds and grace period to 10 seconds.
---
 debian/changelog   |    2 ++
 src/unixhelper.cpp |    8 ++++----
 src/unixhelper.h   |    4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 256695c..d1ab032 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -277,6 +277,8 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
     - x2goclient.cpp: create new argv array on the heap instead of on the
       stack. Stack data will be invalid once the function goes out of scope
       (which is what execv is doing.)
+    - unixhelper.{cpp,h}: raise sleeping time to two seconds and grace period
+      to 10 seconds.
 
   [ Fernando Pedemonte ]
   * New upstream release (4.0.4.0):
diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp
index 2b057ff..2bdaec1 100644
--- a/src/unixhelper.cpp
+++ b/src/unixhelper.cpp
@@ -44,8 +44,8 @@ namespace unixhelper {
         std::cerr << "WARNING: unable to send SIGTERM to process group: " << std::strerror (errno) << std::endl;
       }
 
-      /* Grant a grace period of (at least) 5 seconds. */
-      sleep (5);
+      /* Grant a grace period of (at least) 10 seconds. */
+      sleep (10);
 
       /* Don't handle any errors here, because we die anyway. */
       killpg (getpgrp (), SIGKILL);
@@ -102,9 +102,9 @@ namespace unixhelper {
       }
     }
 
-    /* Sleep forever... at least one second in each run. */
+    /* Sleep forever... at least two seconds in each run. */
     for (;;) {
-      sleep (1);
+      sleep (2);
     }
   }
 }
diff --git a/src/unixhelper.h b/src/unixhelper.h
index 7ca8b43..9f213a8 100644
--- a/src/unixhelper.h
+++ b/src/unixhelper.h
@@ -28,7 +28,7 @@
 namespace unixhelper {
   /*
    * Unblocks all signals and installs a signal handler for SIGHUP,
-   * which calls kill_pgroup.
+   * which calls kill_pgroup().
    *
    * Should signal unblocking or installing the signal handler fail,
    * an emergency exit is performed and
@@ -41,7 +41,7 @@ namespace unixhelper {
   /*
    * Kills the whole process group.
    * First, SIGTERM is sent to the group.
-   * A 5 seconds grace period is granted to make sure
+   * A 10 seconds grace period is granted to make sure
    * processes exit cleanly on their own.
    * Lastly, SIGKILL is sent to the group -- which also
    * implies the demise of this program.

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list