def start(self): if not FAKE_START_FAILURE: gobject.idle_add(self.wrapped_object.start) if FAKE_EXIT>0: def process_exit(): self.cleanup() gobject.timeout_add(250, self.stop) gobject.timeout_add(FAKE_EXIT*1000, process_exit) if FAKE_CRASH>0: def force_exit(): import sys sys.exit(1) gobject.timeout_add(FAKE_CRASH*1000, force_exit) subprocess_callee.start(self)
def subprocess_signal(self, wrapper, proc): log("subprocess_signal: %s", proc) #call via idle_add to prevent deadlocks on win32! gobject.idle_add(self.stop_protocol)