def __init__(self, *args, **kwargs):
super(MultiplexPOSIXIOLoop, self).__init__(*args, **kwargs)
from tornado import ioloop
self.terminating = False
self.sent_sigint = False
self.shell_command = ['/bin/sh', '-c']
self.use_shell = True # Controls whether or not we wrap with the above
self.env = {}
self.io_loop = ioloop.IOLoop.current() # Monitors child for activity
#self.io_loop.set_blocking_signal_threshold(2, self._blocked_io_handler)
#signal.signal(signal.SIGALRM, self._blocked_io_handler)
self.reenable_timeout = None
interval = 100 # A 0.1 second interval should be fast enough
self.scheduler = ioloop.PeriodicCallback(self._timeout_checker,interval)
self.exitstatus = None
self._checking_patterns = False
self.read_timeout = datetime.now()
self.capture_limit = -1 # Huge reads by default
self.restore_rate = None
评论列表
文章目录