[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-10-25 Thread Philip Semanchuk
Changes by Philip Semanchuk : -- nosy: +osvenskan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-23 Thread Charles-François Natali
Charles-François Natali added the comment: > Jan-Philip Gehrcke added the comment: > > Currently the docs say that signal.NSIG is "One more than the number of the > highest signal number." > ("https://docs.python.org/3.4/library/signal.html#signal.NSIG). > > In case of FreeBSD's _SIG_MAXSIG (12

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-23 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Salut!, amis français! (Und auch sonst so, natürlich.) POSIX has recently standardized a NSIG_MAX constant in [1]: The value of {NSIG_MAX} shall be no greater than the number of signals that the sigset_t type (see [cross-ref to ]) is capable of rep

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-23 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: We should match the unit test with the documentation for signal.NSIG. Either the code or the docs or both need to change. Currently the docs say that signal.NSIG is "One more than the number of the highest signal number." ("https://docs.python.org/3.4/lib

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-22 Thread STINNER Victor
STINNER Victor added the comment: Extract of system signal.h: #if __BSD_VISIBLE #define NSIG32 /* number of old signals (counting 0) */ #endif whereas contains: #define _SIG_MAXSIG 128 In signalmodule.c, NSIG is still important in the function sigset_to_set(): we need

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Or the structure could simply host up to 256 handlers, regardless of NSIG. > I'm uncomfortable with tweaking NSIG specifically for FreeBSD. If the FreeBSD > headers export the wrong value, it's not really Python's problem. Agreed. And the current cod

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If you want to kill the arbitrary limit, you need to change this > structure. Or the structure could simply host up to 256 handlers, regardless of NSIG. I'm uncomfortable with tweaking NSIG specifically for FreeBSD. If the FreeBSD headers export the wrong val

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-22 Thread STINNER Victor
STINNER Victor added the comment: The current implementation of _signal requires a limit on the number of signals to its internal array used to store Python callback: static volatile struct { sig_atomic_t tripped; PyObject *func; } Handlers[NSIG]; If you want to kill the arbitrary limi

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-05-22 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: If you are thinking TL;DR: This fails on FreeBSD: >>> signal.signal(signal.SIGRTMAX, lambda *a: None) Traceback (most recent call last): File "", line 1, in ValueError: signal number out of range Although of infrequent use, I doubt that this is expected

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-02-10 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: As a follow-up, relevant output from FreeBSD 9: $ python Python 2.7.5 (default, Dec 20 2013, 21:12:37) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> signals = [

[issue20584] On FreeBSD, signal.NSIG is smaller than biggest signal value

2014-02-10 Thread Jan-Philip Gehrcke
New submission from Jan-Philip Gehrcke: On FreeBSD, signal.NSIG is smaller than what the documentation promises: "One more than the number of the highest signal number". On Linux, the highest numerical signal value is smaller/equal signal.NSIG (expected behavior): >>> import signal >>> signal