1ULIMIT(3)                  Linux Programmer's Manual                 ULIMIT(3)
2
3
4

NAME

6       ulimit - get and set user limits
7

SYNOPSIS

9       #include <ulimit.h>
10
11       long ulimit(int cmd, long newlimit);
12

DESCRIPTION

14       Warning: this routine is obsolete.  Use getrlimit(2), setrlimit(2), and
15       sysconf(3) instead.  For the shell command ulimit(), see bash(1).
16
17       The ulimit() call will get or set some limit for the  calling  process.
18       The cmd argument can have one of the following values.
19
20       UL_GETFSIZE
21              Return the limit on the size of a file, in units of 512 bytes.
22
23       UL_SETFSIZE
24              Set the limit on the size of a file.
25
26       3      (Not  implemented  for  Linux.)   Return  the  maximum  possible
27              address of the data segment.
28
29       4      (Implemented but no symbolic  constant  provided.)   Return  the
30              maximum number of files that the calling process can open.
31

RETURN VALUE

33       On  success,  ulimit()  returns  a  nonnegative value.  On error, -1 is
34       returned, and errno is set appropriately.
35

ERRORS

37       EPERM  An unprivileged process tried to increase a limit.
38

ATTRIBUTES

40       For  an  explanation  of  the  terms  used   in   this   section,   see
41       attributes(7).
42
43       ┌──────────┬───────────────┬─────────┐
44Interface Attribute     Value   
45       ├──────────┼───────────────┼─────────┤
46ulimit()  │ Thread safety │ MT-Safe │
47       └──────────┴───────────────┴─────────┘
48

CONFORMING TO

50       SVr4, POSIX.1-2001.  POSIX.1-2008 marks ulimit() as obsolete.
51

SEE ALSO

53       bash(1), getrlimit(2), setrlimit(2), sysconf(3)
54

COLOPHON

56       This  page  is  part of release 4.15 of the Linux man-pages project.  A
57       description of the project, information about reporting bugs,  and  the
58       latest     version     of     this    page,    can    be    found    at
59       https://www.kernel.org/doc/man-pages/.
60
61
62
63Linux                             2017-09-15                         ULIMIT(3)
Impressum