[X2Go-Commits] [x2goclient] 22/52: 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
Thu Jul 30 04:47:03 CEST 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 ecab9b96d8c5562ca91c8d79ba23a7e16a009a92
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 853830c..2a51515 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,8 @@ x2goclient (4.0.5.1-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.
-- X2Go Release Manager <git-admin at x2go.org> Tue, 28 Jul 2015 06:05:27 +0200
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
More information about the x2go-commits
mailing list