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. The include file is no longer pro‐
15 vided by glibc. Use getrlimit(2), setrlimit(2) and sysconf(3) instead.
16 For the shell command ulimit(), see bash(1).
17
18 The ulimit() call will get or set some limit for the current process.
19 The cmd argument can have one of the following values.
20
21 UL_GETFSIZE
22 Return the limit on the size of a file, in units of 512 bytes.
23
24 UL_SETFSIZE
25 Set the limit on the size of a file.
26
27 3 (Not implemented for Linux.) Return the maximum possible
28 address of the data segment.
29
30 4 (Implemented but no symbolic constant provided.) Return the
31 maximum number of files that the calling process can open.
32
33
35 On success, ulimit() returns a nonnegative value. On error, -1 is
36 returned, and errno is set appropriately.
37
39 EPERM A non-root process tried to increase a limit.
40
42 SVr4, POSIX.1-2001.
43
45 bash(1), getrlimit(2), setrlimit(2), sysconf(3)
46
47
48
49Linux 2.0 1998-06-12 ULIMIT(3)