gh-91880: add try/except around `signal.signal` (#91881)

Fixes gh-91880.
2 files changed