1explain_getrlimit_or_die(3)Library Functions Manualexplain_getrlimit_or_die(3)
2
3
4

NAME

6       explain_getrlimit_or_die - get resource limits and report errors
7

SYNOPSIS

9       #include <libexplain/getrlimit.h>
10       void explain_getrlimit_or_die(int resource, struct rlimit *rlim);
11

DESCRIPTION

13       The  explain_getrlimit_or_die function is used to call the getrlimit(2)
14       system call.  On failure an explanation  will  be  printed  to  stderr,
15       obtained  from explain_getrlimit(3), and then the process terminates by
16       calling exit(EXIT_FAILURE).
17
18       This function is intended to be used in a fashion similar to  the  fol‐
19       lowing example:
20              explain_getrlimit_or_die(resource, rlim);
21
22       resource
23               The  resource, exactly as to be passed to the getrlimit(2) sys‐
24               tem call.
25
26       rlim    The rlim, exactly as to be passed to  the  getrlimit(2)  system
27               call.
28
29       Returns:
30               This  function  only returns on success.  On failure, prints an
31               explanation and exits.
32

SEE ALSO

34       getrlimit(2)
35               get resource limits
36
37       explain_getrlimit(3)
38               explain getrlimit(2) errors
39
40       exit(2) terminate the calling process
41
43       libexplain version 0.40
44       Copyright (C) 2008 Peter Miller
45
46
47
48                                                   explain_getrlimit_or_die(3)
Impressum