[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getrlimit and setrlimit interface
From: |
Ludovic Courtès |
Subject: |
getrlimit and setrlimit interface |
Date: |
Sat, 21 Jun 2014 23:49:43 +0200 |
User-agent: |
Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
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’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- getrlimit and setrlimit interface,
Ludovic Courtès <=