Message251771
getrlimit still returns -1 as 'max' when limit is unlimited and for RLIM_INFINITY because rlim_t is considered signed.
The zshell project decides whether rlim_t is signed/unsigned (and also whether it is long or long long) in the configure step: https://github.com/zsh-users/zsh/blob/8b84419f45298ee564bd6fa2b531c8991b2a1983/configure.ac#L1859
On Linux, rlim_t is unisnged long long so the conversion should be done using PyLong_FromUnsignedLongLong (for RLIM_INFINITY) and using 'KK' instead of 'LL' in 'rlimit2py'.
IMHO the best way to fix this is to add configure steps like in zsh and then adding ifdefs to resource.c - in rlimit2py and near PyModule_AddObject of RLIM_INFINITY |
|
Date |
User |
Action |
Args |
2015-09-28 16:28:58 | wiggin15 | set | recipients:
+ wiggin15, loewis, nnorwitz, mdr0, sable, giampaolo.rodola, ajaksu2, r.david.murray, BreamoreBoy |
2015-09-28 16:28:58 | wiggin15 | set | messageid: <1443457738.4.0.278763848982.issue9917@psf.upfronthosting.co.za> |
2015-09-28 16:28:58 | wiggin15 | link | issue9917 messages |
2015-09-28 16:28:57 | wiggin15 | create | |
|