You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/09/25 22:00:33 UTC
git commit: [#4947] Restart syscalls in taskd graceful signal handlers
Updated Branches:
refs/heads/cj/4947 [created] 452590ccc
[#4947] Restart syscalls in taskd graceful signal handlers
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/452590cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/452590cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/452590cc
Branch: refs/heads/cj/4947
Commit: 452590ccc920adcb9e5b7f6f6a8d378939854ce2
Parents: c8d173d
Author: Cory Johns <jo...@geek.net>
Authored: Tue Sep 25 19:58:21 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Tue Sep 25 19:58:21 2012 +0000
----------------------------------------------------------------------
Allura/allura/command/taskd.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/452590cc/Allura/allura/command/taskd.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/taskd.py b/Allura/allura/command/taskd.py
index c6a6451..12736a5 100644
--- a/Allura/allura/command/taskd.py
+++ b/Allura/allura/command/taskd.py
@@ -32,6 +32,12 @@ class TaskdCommand(base.Command):
signal.signal(signal.SIGHUP, self.graceful_restart)
signal.signal(signal.SIGTERM, self.graceful_stop)
signal.signal(signal.SIGUSR1, self.log_current_task)
+ # restore default behavior of not interrupting system calls
+ # see http://docs.python.org/library/signal.html#signal.siginterrupt
+ # and http://linux.die.net/man/3/siginterrupt
+ signal.siginterrupt(signal.SIGHUP, False)
+ signal.siginterrupt(signal.SIGTERM, False)
+ signal.siginterrupt(signal.SIGUSR1, False)
self.worker()
def graceful_restart(self, signum, frame):