make sure to remove the signal from the worker pipe

The signal was never removed from the pie which was always waking up the worker
triggering a CPU spike.

fix #1269
This commit is contained in:
benoitc 2016-05-20 11:40:20 +02:00
parent f8e14a53b2
commit 39f62ac66b
2 changed files with 3 additions and 1 deletions

View File

@ -254,4 +254,4 @@ class Worker(object):
def handle_winch(self, sig, fname): def handle_winch(self, sig, fname):
# Ignore SIGWINCH in worker. Fixes a crash on OpenBSD. # Ignore SIGWINCH in worker. Fixes a crash on OpenBSD.
return self.log.debug("worker: SIGWINCH ignored.")

View File

@ -34,6 +34,8 @@ class SyncWorker(base.Worker):
self.notify() self.notify()
ret = select.select(self.wait_fds, [], [], timeout) ret = select.select(self.wait_fds, [], [], timeout)
if ret[0]: if ret[0]:
if self.PIPE[0] in ret[0]:
os.read(self.PIPE[0], 1)
return ret[0] return ret[0]
except select.error as e: except select.error as e: