Skip to content

Commit

Permalink
FreeBSD: catch 'ValueError: signal number out of range'
Browse files Browse the repository at this point in the history
The ./tools/display-sighandlers.py script is only used for
debugging build issues. On FreeBSD, some signal numbers are
"out of range" that are reported by the 'signal' module.
  • Loading branch information
jquast committed Feb 22, 2015
1 parent 450f390 commit 9f1bd01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/display-sighandlers.py
Expand Up @@ -12,7 +12,11 @@
for signal_name in dir(signal)
if signal_name.startswith('SIG')
and not signal_name.startswith('SIG_')]:
handler = signal.getsignal(value)
try:
handler = signal.getsignal(value)
except ValueError:
# FreeBSD: signal number out of range
handler = 'out of range'
description = {
signal.SIG_IGN: "ignored(SIG_IGN)",
signal.SIG_DFL: "default(SIG_DFL)"
Expand Down

0 comments on commit 9f1bd01

Please sign in to comment.