Serhiy Storchaka added the comment: And more, as far as standard signal handler is tested for identity, signal.SIG_DFL and _signal.SIG_DFL should be the same object. Current code works only due to coincidence of two circumstances:
1) Small integers are cached in CPython. 2) SIG_DFL and SIG_IGN are small integers on common platforms. When small integer caching is disabled (NSMALLPOSINTS == NSMALLPOSINTS == 0) or when platform depended macros SIG_DFL and SIG_IGN are not small integers, the signal module will mystically fail. The simplest way to solve this issue is to backout turning SIG_DFL and SIG_IGN into enums. ---------- resolution: fixed -> stage: resolved -> patch review type: -> behavior Added file: http://bugs.python.org/file37865/signal_no_enum_handlers.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21076> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com