OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man3 / ulimit.3
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 2008-08-06 "Linux" "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.
36 Use
37 .BR getrlimit (2),
38 .BR setrlimit (2),
39 and
40 .BR sysconf (3)
41 instead.
42 For the shell command
43 .BR ulimit (),
44 see
45 .BR bash (1).
46
47 The
48 .BR ulimit ()
49 call will get or set some limit for the calling 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.
67 .SH "RETURN VALUE"
68 On success,
69 .BR ulimit ()
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 unprivileged process tried to increase a limit.
78 .SH "CONFORMING TO"
79 SVr4, POSIX.1-2001.
80 POSIX.1-2008 marks
81 .BR ulimit ()
82 as obsolete.
83 .SH "SEE ALSO"
84 .BR bash (1),
85 .BR getrlimit (2),
86 .BR setrlimit (2),
87 .BR sysconf (3)