Add faulthandler for traceback on signals
This commit is contained in:
@@ -6,8 +6,10 @@
|
|||||||
# Reading scroll with speed control
|
# Reading scroll with speed control
|
||||||
# Ability to edit text with updates to word-section links
|
# Ability to edit text with updates to word-section links
|
||||||
#
|
#
|
||||||
|
import faulthandler
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import signal
|
||||||
import sys
|
import sys
|
||||||
from typing import Optional, cast
|
from typing import Optional, cast
|
||||||
|
|
||||||
@@ -320,4 +322,7 @@ if __name__ == "__main__":
|
|||||||
# XXX - Update the Makefile so that we can run a `make -q` will
|
# XXX - Update the Makefile so that we can run a `make -q` will
|
||||||
# report back if make needs to be run.
|
# report back if make needs to be run.
|
||||||
#
|
#
|
||||||
|
faulthandler.enable()
|
||||||
|
faulthandler.register(signal.SIGHUP)
|
||||||
|
faulthandler.register(signal.SIGUSR1)
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|||||||
Reference in New Issue
Block a user