summaryrefslogtreecommitdiffstats
path: root/kolabd/__init__.py
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 /kolabd/__init__.py
parent29113644952841b5ef13cef820ac8c3326189f13 (diff)
downloadpykolab-4a51c002a4372b267f4ba31040b82d5f844c8c96.tar.gz
Fix SIGPIPE errors in wallace due to closing stderr and reusing FD2 by @fjl
Diffstat (limited to 'kolabd/__init__.py')
-rw-r--r--kolabd/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kolabd/__init__.py b/kolabd/__init__.py
index a5869d5..0477ebc 100644
--- a/kolabd/__init__.py
+++ b/kolabd/__init__.py
@@ -202,6 +202,10 @@ class KolabDaemon(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()