summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-05-17 10:10:36 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-05-17 10:10:36 +0200
commit4a51c002a4372b267f4ba31040b82d5f844c8c96 (patch)
tree9244c241050a38cbb263549c2440603635f04f05 /wallace
parent29113644952841b5ef13cef820ac8c3326189f13 (diff)
downloadpykolab-4a51c002a4372b267f4ba31040b82d5f844c8c96.tar.gz
Fix SIGPIPE errors in wallace due to closing stderr and reusing FD2 by @fjl
Diffstat (limited to 'wallace')
-rw-r--r--wallace/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wallace/__init__.py b/wallace/__init__.py
index 6e79d97..0078ec1 100644
--- a/wallace/__init__.py
+++ b/wallace/__init__.py
@@ -508,6 +508,10 @@ class WallaceDaemon(object):
os.close(1)
os.close(2)
+ os.open(os.devnull, os.O_RDONLY)
+ os.open(os.devnull, os.O_WRONLY)
+ os.open(os.devnull, os.O_WRONLY)
+
log.remove_stdout_handler()
self.set_signal_handlers()
self.write_pid()