fix(DX): add faulthandler for SEGV and other bad signals (#30046)

This commit is contained in:
Ankush Menat 2025-01-24 19:54:54 +05:30 committed by GitHub
parent c067fd4b62
commit 57633f1387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,7 @@ def optimize_regex_cache():
def register_fault_handler():
# Some libraries monkey patch stderr, we need actual fd
if isinstance(sys.__stderr__, io.TextIOWrapper):
faulthandler.enable()
faulthandler.register(signal.SIGUSR1, file=sys.__stderr__)