1ULIMIT(3) Linux Programmer's Manual ULIMIT(3)
2
3
4
6 ulimit - get and set user limits
7
9 #include <ulimit.h>
10
11 long ulimit(int cmd, long newlimit);
12
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
33 On success, ulimit() returns a non-negative value. On error, -1 is
34 returned, and errno is set appropriately.
35
37 EPERM A non-root process tried to increase a limit.
38
40 SVr4, POSIX.1-2001. POSIX.1-2008 marks ulimit() as obsolete.
41
43 bash(1), getrlimit(2), setrlimit(2), sysconf(3)
44
46 This page is part of release 3.22 of the Linux man-pages project. A
47 description of the project, and information about reporting bugs, can
48 be found at http://www.kernel.org/doc/man-pages/.
49
50
51
52Linux 2008-08-06 ULIMIT(3)