MCPcopy Index your code
hub / github.com/python/cpython / disable_faulthandler

Function disable_faulthandler

Lib/test/support/__init__.py:2165–2179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2163
2164@contextlib.contextmanager
2165def disable_faulthandler():
2166 import faulthandler
2167
2168 # use sys.__stderr__ instead of sys.stderr, since regrtest replaces
2169 # sys.stderr with a StringIO which has no file descriptor when a test
2170 # is run with -W/--verbose3.
2171 fd = sys.__stderr__.fileno()
2172
2173 is_enabled = faulthandler.is_enabled()
2174 try:
2175 faulthandler.disable()
2176 yield
2177 finally:
2178 if is_enabled:
2179 faulthandler.enable(file=fd, all_threads=True)
2180
2181
2182class SaveSignals:

Callers

nothing calls this directly

Calls 3

filenoMethod · 0.45
disableMethod · 0.45
enableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…