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 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 #3
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 #4
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 #5
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 #6
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 #7
0
 def cleanup(self):
     reaper_cleanup()
     FilePrintMixin.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")
     self.cancel_send_mouse_position_timer()
     dump_all_frames()
Example #8
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()
Example #9
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()
Example #10
0
 def cleanup(self):
     reaper_cleanup()
     try:
         FilePrintMixin.cleanup(self)
     except Exception:
         log.error("%s", FilePrintMixin.cleanup, exc_info=True)
     p = self._protocol
     log("XpraClientBase.cleanup() protocol=%s", p)
     if p:
         log("calling %s", p.close)
         p.close()
         self._protocol = None
     log("cleanup done")
     self.cancel_send_mouse_position_timer()
     dump_all_frames()
Example #11
0
 def cleanup(self):
     self.stop_all_proxies()
     ServerCore.cleanup(self)
     start = monotonic_time()
     live = True
     log("cleanup() proxy instances: %s", self.instances)
     while monotonic_time() - start < PROXY_CLEANUP_GRACE_PERIOD and live:
         live = tuple(x for x in tuple(self.instances.keys())
                      if x.is_alive())
         if live:
             log("cleanup() still %i proxies alive: %s", len(live), live)
             time.sleep(0.1)
     if live:
         self.stop_all_proxies(True)
     log("cleanup() frames remaining:")
     from xpra.util import dump_all_frames
     dump_all_frames(log)
Example #12
0
 def sigusr1(_sig):
     log.info("SIGUSR1")
     dump_all_frames(log.info)
     return True