Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Numerical values of signal numbers are standardized. signal.signal(15, handler) 
is valid. SIGTERM is just a handy name for the constant 15.

But SIG_DFL and SIG_IGN are not integers in C (they are special pointers), and 
it is not declared anywhere that they should be integers in Python. The code 
that converts them to Python integer is implementation depending 
(PyLong_FromVoidPtr). Handcrafted SIG_DFL and SIG_IGN are broken by design, 
because the signal module uses identity comparison for SIG_DFL and SIG_IGN.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue23325>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to