The ‘getrlimit’ and ‘setrlimit’ procedures are not documented in the manual. They’re supposed to be passed a symbol or a number:
(getrlimit 'nofile) == (getrlimit 7) ≍ getrlimit (RLIMIT_NOFILE, &lim) For most other POSIX functions with a similar interface, we instead define Scheme variables with the same name as in C (like ‘RLIMIT_NOFILE’) and these are then passed directly to the procedure. Here’s a proposal: define RLIMIT_* Scheme variables, document ‘getrlimit’ and ‘setrlimit’ to accept those, and emit a deprecation warning when the symbol is used. WDYT? Ludo’.