1ulimit(3)                  Library Functions Manual                  ulimit(3)
2
3
4

NAME

6       ulimit - get and set user limits
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <ulimit.h>
13
14       [[deprecated]] long ulimit(int cmd, long newlimit);
15

DESCRIPTION

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

RETURN VALUE

36       On  success, ulimit() returns a nonnegative value.  On error, -1 is re‐
37       turned, and errno is set to indicate the error.
38

ERRORS

40       EPERM  An unprivileged process tried to increase a limit.
41

ATTRIBUTES

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

STANDARDS

53       POSIX.1-2008.
54

HISTORY

56       SVr4, POSIX.1-2001.  POSIX.1-2008 marks it as obsolete.
57

SEE ALSO

59       bash(1), getrlimit(2), setrlimit(2), sysconf(3)
60
61
62
63Linux man-pages 6.05              2023-07-20                         ulimit(3)
Impressum