From 93495ee52b237b1baf971fb835a409dd0d37e7dc Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 10 May 2016 02:03:29 +0200 Subject: Watcher: Clean signal handlers after fork Fork does not reset the signal handlers to the default values, so if the child process receives a SIGTERM the method of the parent process is called and causes very strange behaviour. --- __init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/__init__.py b/__init__.py index d3f6b06..b3ea420 100755 --- a/__init__.py +++ b/__init__.py @@ -25,6 +25,7 @@ class Watcher(object): if child != 0: self._children.append(child) else: + signal.signal(signal.SIGTERM, signal.SIG_DFL) run_phenny(config) def run(self): -- cgit v1.2.3-1-g7c22