Message230026
Here is the preliminary patch. It's a thin wrapper of strsignal.
Some issues and things:
1. About Benjamin Peterson's request, what is the name of the dictionary supposed to be? Is everyone okay with Benjamin's suggestion?
2. About George Brandl's question: "Is it possible to determine the range of signal numbers?" We have a heuristic algorithm:
#ifndef NSIG
# if defined(_NSIG)
# define NSIG _NSIG /* For BSD/SysV */
# elif defined(_SIGMAX)
# define NSIG (_SIGMAX + 1) /* For QNX */
# elif defined(SIGMAX)
# define NSIG (SIGMAX + 1) /* For djgpp */
# else
# define NSIG 64 /* Use a reasonable default value */
# endif
#endif
if (sig_num < 1 || sig_num >= NSIG) {
PyErr_SetString(PyExc_ValueError,
"signal number out of range");
return NULL;
}
3. For the unknown signal, what is the description should be? "Unknown signal" like c function returns or None?
4. What is the name of the function that wrap strsignal should be? I use strsignal for now. I just don't think it is appropriate. |
|
Date |
User |
Action |
Args |
2014-10-26 12:26:40 | vajrasky | set | recipients:
+ vajrasky, georg.brandl, vstinner, benjamin.peterson, r.david.murray, Dolda2000 |
2014-10-26 12:26:40 | vajrasky | set | messageid: <1414326400.6.0.282185706589.issue22674@psf.upfronthosting.co.za> |
2014-10-26 12:26:40 | vajrasky | link | issue22674 messages |
2014-10-26 12:26:40 | vajrasky | create | |
|