This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jgehrcke
Recipients jgehrcke, neologix, pitrou, sdaoden, vstinner
Date 2014-05-23.09:57:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400839060.2.0.7667288716.issue20584@psf.upfronthosting.co.za>
In-reply-to
Content
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/library/signal.html#signal.NSIG).

In case of FreeBSD's _SIG_MAXSIG (128) the documentation is still wrong: the highest signal value MAX is 126 (see http://bugs.python.org/issue20584#msg210892). According to the docs, NSIG should then be 127.

In signal_nsig_freebsd-2.patch the test `self.assertLess(max(signals), signal.NSIG)` tests for NSIG > MAX instead of for NSIG = MAX+1.

So, either 

- we count signals by ourselves and build our own value of NSIG, in which case we can guarantee that NSIG = MAX+1 or

- we rely on the platform header files for extracting NSIG, but must note in the docs that NSIG is not always MAX+1.

The current patch + a documentation change would implement the latter case.

What is the exact meaning of _SIG_MAXSIG, where is that meaning defined?
History
Date User Action Args
2014-05-23 09:57:40jgehrckesetrecipients: + jgehrcke, pitrou, vstinner, neologix, sdaoden
2014-05-23 09:57:40jgehrckesetmessageid: <1400839060.2.0.7667288716.issue20584@psf.upfronthosting.co.za>
2014-05-23 09:57:40jgehrckelinkissue20584 messages
2014-05-23 09:57:38jgehrckecreate