after honcho start, press Ctrl-C, will yield exception:
...
File "venv/local/lib/python2.7/site-packages/honcho/command.py", line 220, in command_start
manager.loop()
File "venv/local/lib/python2.7/site-packages/honcho/manager.py", line 110, in loop
msg = self.events.get(timeout=0.1)
File "/usr/lib/python2.7/multiprocessing/queues.py", line 131, in get
if timeout < 0 or not self._poll(timeout):
IOError: [Errno 4] Interrupted system call
this error could be simplely ignored IMO:
*** 111,116 ****
--- 111,120 ----
except Empty:
if exit:
break
+ except IOError as e:
+ if e.errno != errno.EINTR:
+ raise
+ exit = True
else:
if msg.type == 'line':
self._printer.write(msg)
or use an alternative paradigm:
@@ -2,6 +2,7 @@ import datetime
import multiprocessing
import signal
import sys
+import time
from .colour import get_colours
from .compat import Empty
@@ -107,10 +108,11 @@ class Manager(object):
while 1:
try:
- msg = self.events.get(timeout=0.1)
+ msg = self.events.get(False)
except Empty:
if exit:
break
+ time.sleep(0.1)
else:
if msg.type == 'line':
self._printer.write(msg)
after
honcho start
, press Ctrl-C, will yield exception:this error could be simplely ignored IMO:
or use an alternative paradigm: