]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Hey Emacs! This file is -*- nroff -*- source. |
2 | .\" | |
3 | .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) | |
4 | .\" | |
5 | .\" Permission is granted to make and distribute verbatim copies of this | |
6 | .\" manual provided the copyright notice and this permission notice are | |
7 | .\" preserved on all copies. | |
8 | .\" | |
9 | .\" Permission is granted to copy and distribute modified versions of this | |
10 | .\" manual under the conditions for verbatim copying, provided that the | |
11 | .\" entire resulting derived work is distributed under the terms of a | |
12 | .\" permission notice identical to this one. | |
13 | .\" | |
14 | .\" Since the Linux kernel and libraries are constantly changing, this | |
15 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
16 | .\" responsibility for errors or omissions, or for damages resulting from | |
17 | .\" the use of the information contained herein. The author(s) may not | |
18 | .\" have taken the same level of care in the production of this manual, | |
19 | .\" which is licensed free of charge, as they might when working | |
20 | .\" professionally. | |
21 | .\" | |
22 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
23 | .\" the source, must acknowledge the copyright and authors of this work. | |
24 | .\" | |
25 | .\" Moved to man3, aeb, 980612 | |
26 | .\" | |
27 | .TH ULIMIT 3 1998-06-12 "Linux 2.0" "Linux Programmer's Manual" | |
28 | .SH NAME | |
29 | ulimit \- get and set user limits | |
30 | .SH SYNOPSIS | |
31 | .B #include <ulimit.h> | |
32 | .sp | |
33 | .BI "long ulimit(int " cmd ", long " newlimit ); | |
34 | .SH DESCRIPTION | |
35 | Warning: This routine is obsolete. The include file is no longer | |
b5cc2ffb MK |
36 | provided by glibc. Use |
37 | .BR getrlimit (2), | |
38 | .BR setrlimit (2) | |
39 | and | |
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). | |
46 | ||
47 | The | |
e511ffb6 | 48 | .BR ulimit () |
fea681da MK |
49 | call will get or set some limit for the current process. |
50 | The | |
51 | .I cmd | |
52 | argument can have one of the following values. | |
53 | .TP | |
54 | .B UL_GETFSIZE | |
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. | |
fea681da MK |
67 | .SH "RETURN VALUE" |
68 | On success, | |
e511ffb6 | 69 | .BR ulimit () |
fea681da MK |
70 | returns a nonnegative value. |
71 | On error, \-1 is returned, and | |
72 | .I errno | |
73 | is set appropriately. | |
74 | .SH ERRORS | |
75 | .TP | |
76 | .B EPERM | |
77 | A non-root process tried to increase a limit. | |
78 | .SH "CONFORMING TO" | |
68e1685c | 79 | SVr4, POSIX.1-2001. |
fea681da MK |
80 | .SH "SEE ALSO" |
81 | .BR bash (1), | |
82 | .BR getrlimit (2), | |
83 | .BR setrlimit (2), | |
84 | .BR sysconf (3) |