Go to the source code of this file.
|
|
#define | RLIMIT_CPU 0 |
| |
|
#define | RLIMIT_FSIZE 1 |
| |
|
#define | RLIMIT_DATA 2 |
| |
|
#define | RLIMIT_STACK 3 |
| |
|
#define | RLIMIT_CORE 4 |
| |
|
#define | RLIMIT_RSS 5 |
| |
|
#define | RLIMIT_NPROC 6 |
| |
|
#define | RLIMIT_NOFILE 7 |
| |
|
#define | RLIMIT_MEMLOCK 8 |
| |
|
#define | RLIMIT_AS 9 |
| |
|
#define | RLIMIT_LOCKS 10 |
| |
|
#define | RLIMIT_SIGPENDING 11 |
| |
|
#define | RLIMIT_MSGQUEUE 12 |
| |
|
#define | RLIMIT_NICE 13 |
| |
|
#define | RLIMIT_RTPRIO 14 |
| |
|
#define | RLIM_INFINITY (~0ULL) |
| |
|
|
typedef unsigned long long | rlim_t |
| |
|
| int | getrlimit (int resource, struct rlimit *rlim) |
| | Read the limit of a resource. The limits of Tenok are properties of the build, so the two fields always read back the same. More...
|
| |
| int | setrlimit (int resource, const struct rlimit *rlim) |
| | Replace the limit of a resource. Every limit of Tenok is fixed at the build, so only a request that asks for no more than what is already in effect can be granted. More...
|
| |
◆ getrlimit()
| int getrlimit |
( |
int |
resource, |
|
|
struct rlimit * |
rlim |
|
) |
| |
Read the limit of a resource. The limits of Tenok are properties of the build, so the two fields always read back the same.
- Parameters
-
| resource | One of the RLIMIT_ values. |
| rlim | The buffer for returning the limit. |
- Return values
-
| int | 0 on success and -1 on error, with the reason left in errno. |
◆ setrlimit()
| int setrlimit |
( |
int |
resource, |
|
|
const struct rlimit * |
rlim |
|
) |
| |
Replace the limit of a resource. Every limit of Tenok is fixed at the build, so only a request that asks for no more than what is already in effect can be granted.
- Parameters
-
| resource | One of the RLIMIT_ values. |
| rlim | The limit to apply. |
- Return values
-
| int | 0 on success and -1 on error, with the reason left in errno. |