MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / signal_handler

Function signal_handler

src/helper_generic.py:47–61  ·  view source on GitHub ↗
(signal, frame)

Source from the content-addressed store, hash-verified

45 print "\n".join(code)
46
47def signal_handler(signal, frame):
48 logger.error("Got signal %i in %s/%s", signal, current_process().name, current_thread().name)
49 if current_process().name == "RegExParser":
50 # on Windows this isn't triggered, but it's fine, it has its own process termination thing
51 raise SystemExit
52 if "PoolWorker" in current_process().name:
53 raise SystemExit
54 if current_thread().name not in ("PyBitmessage", "MainThread"):
55 return
56 logger.error("Got signal %i", signal)
57 if shared.thisapp.daemon:
58 shutdown.doCleanShutdown()
59 else:
60 allThreadTraceback(frame)
61 print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.'
62
63def isHostInPrivateIPRange(host):
64 if ":" in host: #IPv6

Callers

nothing calls this directly

Calls 1

allThreadTracebackFunction · 0.85

Tested by

no test coverage detected