fix(DX): add faulthandler for SEGV and other bad signals (#30046)
This commit is contained in:
parent
c067fd4b62
commit
57633f1387
1 changed files with 1 additions and 0 deletions
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue