Debian Codegraph @

upstream/debian-trixie/man3/ulimit.3

raw
1 '\" t
2 .\" Copyright (C) 1996 Andries Brouwer ([email protected])
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\" Moved to man3, aeb, 980612
7 .\"
8 .TH ulimit 3 2024-05-02 "Linux man-pages 6.9.1"
9 .SH NAME
10 ulimit \- get and set user limits
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #include <ulimit.h>
17 .P
18 .BI "[[deprecated]] long ulimit(int " cmd ", long " newlimit );
19 .fi
20 .SH DESCRIPTION
21 Warning: this routine is obsolete.
22 Use
23 .BR getrlimit (2),
24 .BR setrlimit (2),
25 and
26 .BR sysconf (3)
27 instead.
28 For the shell command
29 .BR ulimit ,
30 see
31 .BR bash (1).
32 .P
33 The
34 .BR ulimit ()
35 call will get or set some limit for the calling process.
36 The
37 .I cmd
38 argument can have one of the following values.
39 .TP
40 .B UL_GETFSIZE
41 Return the limit on the size of a file, in units of 512 bytes.
42 .TP
43 .B UL_SETFSIZE
44 Set the limit on the size of a file.
45 .TP
46 .B 3
47 (Not implemented for Linux.)
48 Return the maximum possible address of the data segment.
49 .TP
50 .B 4
51 (Implemented but no symbolic constant provided.)
52 Return the maximum number of files that the calling process can open.
53 .SH RETURN VALUE
54 On success,
55 .BR ulimit ()
56 returns a nonnegative value.
57 On error, \-1 is returned, and
58 .I errno
59 is set to indicate the error.
60 .SH ERRORS
61 .TP
62 .B EPERM
63 An unprivileged process tried to increase a limit.
64 .SH ATTRIBUTES
65 For an explanation of the terms used in this section, see
66 .BR attributes (7).
67 .TS
68 allbox;
69 lbx lb lb
70 l l l.
71 Interface Attribute Value
72 T{
73 .na
74 .nh
75 .BR ulimit ()
76 T} Thread safety MT-Safe
77 .TE
78 .SH STANDARDS
79 POSIX.1-2008.
80 .SH HISTORY
81 SVr4, POSIX.1-2001.
82 POSIX.1-2008 marks it as obsolete.
83 .SH SEE ALSO
84 .BR bash (1),
85 .BR getrlimit (2),
86 .BR setrlimit (2),
87 .BR sysconf (3)