def signal_handler(signum, frame): """Single handler for any signal sent to pybitmessage""" process = multiprocessing.current_process() thread = threading.current_thread() logger.error( 'Got signal %i in %s/%s', signum, process.name, thread.name ) if process.name == "RegExParser": # on Windows this isn't triggered, but it's fine, # it has its own process termination thing raise SystemExit if "PoolWorker" in process.name: raise SystemExit if thread.name not in ("PyBitmessage", "MainThread"): return logger.error("Got signal %i", signum) # there are possible non-UI variants to run bitmessage # which should shutdown especially test-mode if state.thisapp.daemon or not state.enableGUI: shutdown.doCleanShutdown() else: print('# Thread: %s(%d)' % (thread.name, thread.ident)) for filename, lineno, name, line in traceback.extract_stack(frame): print('File: "%s", line %d, in %s' % (filename, lineno, name)) if line: print(' %s' % line.strip()) print('Unfortunately you cannot use Ctrl+C when running the UI' ' because the UI captures the signal.')
def say_exit(self): """Exit the application as uses shutdown PyBitmessage.""" print( "**************************EXITING FROM APPLICATION*****************************" ) App.get_running_app().stop() shutdown.doCleanShutdown()
def signal_handler(signal, frame): logger.error("Got signal %i in %s/%s", signal, current_process().name, current_thread().name) if current_process().name == "RegExParser": # on Windows this isn't triggered, but it's fine, it has its own process termination thing raise SystemExit if "PoolWorker" in current_process().name: raise SystemExit if current_thread().name != "MainThread": return logger.error("Got signal %i", signal) if BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon'): shutdown.doCleanShutdown() else: print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
def signal_handler(signal, frame): logger.error("Got signal %i in %s/%s", signal, current_process().name, threading.current_thread().name) if "PoolWorker" in current_process().name: raise SystemExit if threading.current_thread().name not in ("PyBitmessage", "MainThread"): return logger.error("Got signal %i", signal) if shared.thisapp.daemon or not state.enableGUI: # FIXME redundant? shutdown.doCleanShutdown() else: allThreadTraceback(frame) print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
def signal_handler(signal, frame): logger.error("Got signal %i in %s/%s", signal, current_process().name, current_thread().name) if current_process().name == "RegExParser": # on Windows this isn't triggered, but it's fine, it has its own process termination thing raise SystemExit if "PoolWorker" in current_process().name: raise SystemExit if current_thread().name not in ("PyBitmessage", "MainThread"): return logger.error("Got signal %i", signal) if shared.thisapp.daemon: shutdown.doCleanShutdown() else: allThreadTraceback(frame) print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
def signal_handler(signal, frame): logger.error("Got signal %i in %s/%s", signal, current_process().name, current_thread().name) if current_process().name == "RegExParser": # on Windows this isn't triggered, but it's fine, it has its own process termination thing raise SystemExit if "PoolWorker" in current_process().name: raise SystemExit if current_thread().name != "PyBitmessage": return logger.error("Got signal %i", signal) if BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon'): shutdown.doCleanShutdown() else: allThreadTraceback(frame) print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
def signal_handler(signal, frame): process = multiprocessing.current_process() logger.error('Got signal %i in %s/%s', signal, process.name, threading.current_thread().name) if process.name == "RegExParser": # on Windows this isn't triggered, but it's fine, # it has its own process termination thing raise SystemExit if "PoolWorker" in process.name: raise SystemExit if threading.current_thread().name not in ("PyBitmessage", "MainThread"): return logger.error("Got signal %i", signal) if shared.thisapp.daemon or not state.enableGUI: # FIXME redundant? shutdown.doCleanShutdown() else: allThreadTraceback(frame) print('Unfortunately you cannot use Ctrl+C when running the UI' ' because the UI captures the signal.')
def stop(self): with shared.printLock: print('Stopping Bitmessage Deamon.') shutdown.doCleanShutdown()
def stop(): """Stop main application""" with printLock: print('Stopping Bitmessage Deamon.') shutdown.doCleanShutdown()
def HandleShutdown(self, params): if not params: shutdown.doCleanShutdown() return 'done'
def say_exit(self): print( "**************************EXITING FROM APPLICATION*****************************" ) App.get_running_app().stop() shutdown.doCleanShutdown()