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 wiggin15
Recipients BreamoreBoy, ajaksu2, giampaolo.rodola, loewis, mdr0, nnorwitz, r.david.murray, sable, wiggin15
Date 2015-09-28.16:28:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443457738.4.0.278763848982.issue9917@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-09-28 16:28:58wiggin15setrecipients: + wiggin15, loewis, nnorwitz, mdr0, sable, giampaolo.rodola, ajaksu2, r.david.murray, BreamoreBoy
2015-09-28 16:28:58wiggin15setmessageid: <1443457738.4.0.278763848982.issue9917@psf.upfronthosting.co.za>
2015-09-28 16:28:58wiggin15linkissue9917 messages
2015-09-28 16:28:57wiggin15create