]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/ulimit.3
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir...
[thirdparty/man-pages.git] / man3 / ulimit.3
CommitLineData
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.\"
4725e646 27.TH ULIMIT 3 2008-08-06 "Linux" "Linux Programmer's Manual"
fea681da
MK
28.SH NAME
29ulimit \- 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
c13182ef 35Warning: This routine is obsolete.
c13182ef
MK
36Use
37.BR getrlimit (2),
0114e11f 38.BR setrlimit (2),
c13182ef 39and
b5cc2ffb 40.BR sysconf (3)
fea681da
MK
41instead.
42For the shell command
e511ffb6 43.BR ulimit (),
fea681da
MK
44see
45.BR bash (1).
46
47The
e511ffb6 48.BR ulimit ()
a1ffe9f5 49call will get or set some limit for the calling process.
fea681da
MK
50The
51.I cmd
52argument can have one of the following values.
53.TP
c13182ef 54.B UL_GETFSIZE
fea681da
MK
55Return the limit on the size of a file, in units of 512 bytes.
56.TP
57.B UL_SETFSIZE
58Set the limit on the size of a file.
59.TP
60.B 3
61(Not implemented for Linux.)
62Return the maximum possible address of the data segment.
63.TP
64.B 4
65(Implemented but no symbolic constant provided.)
66Return the maximum number of files that the calling process can open.
47297adb 67.SH RETURN VALUE
fea681da 68On success,
e511ffb6 69.BR ulimit ()
2fda57bd 70returns a nonnegative value.
fea681da
MK
71On error, \-1 is returned, and
72.I errno
73is set appropriately.
74.SH ERRORS
75.TP
76.B EPERM
00b08db3 77A unprivileged process tried to increase a limit.
47297adb 78.SH CONFORMING TO
68e1685c 79SVr4, POSIX.1-2001.
daed69bc 80POSIX.1-2008 marks
b640cde8 81.BR ulimit ()
daed69bc 82as obsolete.
47297adb 83.SH SEE ALSO
fea681da
MK
84.BR bash (1),
85.BR getrlimit (2),
86.BR setrlimit (2),
87.BR sysconf (3)