Commit 36224436 authored by mathieui's avatar mathieui

Keep a file descriptor reading the fifo instead of just opening and closing it

should take care of the sigpipe when no one is reading it anymore due to
broken connection
parent 04010298
......@@ -30,9 +30,10 @@ class OpenTrick(threading.Thread):
def __init__(self, path):
threading.Thread.__init__(self)
self.path = path
self.fd = None
def run(self):
open(self.path, 'r', encoding='utf-8').close()
self.fd = open(self.path, 'r', encoding='utf-8')
class Fifo(object):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment