]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" Moved to man3, aeb, 980612 | |
26 | .\" | |
4b8c67d9 | 27 | .TH ULIMIT 3 2017-09-15 "Linux" "Linux Programmer's Manual" |
fea681da MK |
28 | .SH NAME |
29 | ulimit \- get and set user limits | |
30 | .SH SYNOPSIS | |
31 | .B #include <ulimit.h> | |
68e4db0a | 32 | .PP |
fea681da MK |
33 | .BI "long ulimit(int " cmd ", long " newlimit ); |
34 | .SH DESCRIPTION | |
f64cc745 | 35 | Warning: this routine is obsolete. |
c13182ef MK |
36 | Use |
37 | .BR getrlimit (2), | |
0114e11f | 38 | .BR setrlimit (2), |
c13182ef | 39 | and |
b5cc2ffb | 40 | .BR sysconf (3) |
fea681da MK |
41 | instead. |
42 | For the shell command | |
e511ffb6 | 43 | .BR ulimit (), |
fea681da MK |
44 | see |
45 | .BR bash (1). | |
847e0d88 | 46 | .PP |
fea681da | 47 | The |
e511ffb6 | 48 | .BR ulimit () |
a1ffe9f5 | 49 | call will get or set some limit for the calling process. |
fea681da MK |
50 | The |
51 | .I cmd | |
52 | argument can have one of the following values. | |
53 | .TP | |
c13182ef | 54 | .B UL_GETFSIZE |
fea681da MK |
55 | Return the limit on the size of a file, in units of 512 bytes. |
56 | .TP | |
57 | .B UL_SETFSIZE | |
58 | Set the limit on the size of a file. | |
59 | .TP | |
60 | .B 3 | |
61 | (Not implemented for Linux.) | |
62 | Return the maximum possible address of the data segment. | |
63 | .TP | |
64 | .B 4 | |
65 | (Implemented but no symbolic constant provided.) | |
66 | Return the maximum number of files that the calling process can open. | |
47297adb | 67 | .SH RETURN VALUE |
fea681da | 68 | On success, |
e511ffb6 | 69 | .BR ulimit () |
2fda57bd | 70 | returns a nonnegative value. |
fea681da MK |
71 | On error, \-1 is returned, and |
72 | .I errno | |
73 | is set appropriately. | |
74 | .SH ERRORS | |
75 | .TP | |
76 | .B EPERM | |
ba7fd6d5 | 77 | An unprivileged process tried to increase a limit. |
9eb64fab MS |
78 | .SH ATTRIBUTES |
79 | For an explanation of the terms used in this section, see | |
80 | .BR attributes (7). | |
81 | .TS | |
82 | allbox; | |
83 | lb lb lb | |
84 | l l l. | |
85 | Interface Attribute Value | |
86 | T{ | |
87 | .BR ulimit () | |
88 | T} Thread safety MT-Safe | |
89 | .TE | |
847e0d88 | 90 | .sp 1 |
47297adb | 91 | .SH CONFORMING TO |
68e1685c | 92 | SVr4, POSIX.1-2001. |
daed69bc | 93 | POSIX.1-2008 marks |
b640cde8 | 94 | .BR ulimit () |
daed69bc | 95 | as obsolete. |
47297adb | 96 | .SH SEE ALSO |
fea681da MK |
97 | .BR bash (1), |
98 | .BR getrlimit (2), | |
99 | .BR setrlimit (2), | |
100 | .BR sysconf (3) |