This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit e6f6c9fcafadbcd23367e20a154dd8446db45fda Author: Mihai Moldovan <ionic@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 1baf6d6..52168b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -76,6 +76,8 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium - 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. * debian/control: - Maintainer change in package: X2Go Developers <x2go-dev@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 fdcaac9..d4698df 100644 --- a/src/unixhelper.cpp +++ b/src/unixhelper.cpp @@ -40,8 +40,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); @@ -98,9 +98,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