[New-bugs-announce] [issue28069] signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL

Mark Dickinson report at bugs.python.org
Sat Sep 10 15:49:19 EDT 2016


New submission from Mark Dickinson:

Modules/signalmodule.c contains this code:

    if (handler == IgnoreHandler)
        func = SIG_IGN;
    else if (handler == DefaultHandler)
        func = SIG_DFL;
    ...

Here IgnoreHandler and DefaultHandler are ints. The code above effectively does an "is" comparison with those ints, assuming that SIG_IGN and SIG_DFL are amongst the small interned ints.

----------
messages: 275687
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28069>
_______________________________________


More information about the New-bugs-announce mailing list