allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#4947] Restart syscalls in taskd graceful signal handlers
Date Wed, 26 Sep 2012 15:48:14 GMT
Updated Branches:
  refs/heads/master ef4b46156 -> a87bfb485


[#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/a87bfb48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a87bfb48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a87bfb48

Branch: refs/heads/master
Commit: a87bfb48504df3af0a94c09ea2b70e98d9045bc4
Parents: ef4b461
Author: Cory Johns <johnsca@geek.net>
Authored: Tue Sep 25 19:58:21 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Sep 26 15:47:59 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/a87bfb48/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):


Mime
View raw message