Example #1
0
 def clean_quit(self, upgrading=False):
     log("clean_quit(%s)", upgrading)
     self._upgrading = upgrading
     self._closing = True
     #ensure the reaper doesn't call us again:
     if self.child_reaper:
         def noop():
             pass
         self.reaper_exit = noop
         log("clean_quit: reaper_exit=%s", self.reaper_exit)
     self.cleanup()
     def quit_timer(*args):
         log.debug("quit_timer()")
         stop_worker(True)
         self.quit(upgrading)
     #if from a signal, just force quit:
     stop_worker()
     #not from signal: use force stop worker after delay
     self.timeout_add(250, stop_worker, True)
     self.timeout_add(500, quit_timer)
     def force_quit(*args):
         log.debug("force_quit()")
         from xpra import os_util
         os_util.force_quit()
     self.timeout_add(5000, force_quit)
     log("clean_quit(..) quit timers scheduled")
     dump_all_frames()
Example #2
0
 def quit(self, upgrading=False):
     log("quit(%s)", upgrading)
     self._upgrading = upgrading
     log.info("xpra is terminating.")
     sys.stdout.flush()
     self.do_quit()
     log("quit(%s) do_quit done!", upgrading)
     dump_all_frames()
Example #3
0
 def cleanup(self):
     reaper_cleanup()
     p = self._protocol
     log("XpraClientBase.cleanup() protocol=%s", p)
     if p:
         log("calling %s", p.close)
         p.close()
         self._protocol = None
     self.cleanup_printing()
     log("cleanup done")
     dump_all_frames()
Example #4
0
 def cleanup(self):
     reaper_cleanup()
     # we must clean printing before FileTransferHandler, which turns the printing flag off!
     self.cleanup_printing()
     FileTransferHandler.cleanup(self)
     p = self._protocol
     log("XpraClientBase.cleanup() protocol=%s", p)
     if p:
         log("calling %s", p.close)
         p.close()
         self._protocol = None
     log("cleanup done")
     dump_all_frames()