update NEWS
[manpages-zh.git] / raw / man3 / ulimit.3
blob684a7dde3025736f0c8b7be4175696f7d279ace3
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
36 provided by glibc.  Use getrlimit(2), setrlimit(2) and sysconf(3)
37 instead.
38 For the shell command
39 .BR ulimit ,
40 see
41 .BR bash (1).
43 The
44 .B ulimit
45 call will get or set some limit for the current process.
46 The
47 .I cmd
48 argument can have one of the following values.
49 .TP
50 .B UL_GETFSIZE 
51 Return the limit on the size of a file, in units of 512 bytes.
52 .TP
53 .B UL_SETFSIZE
54 Set the limit on the size of a file.
55 .TP
56 .B 3
57 (Not implemented for Linux.)
58 Return the maximum possible address of the data segment.
59 .TP
60 .B 4
61 (Implemented but no symbolic constant provided.)
62 Return the maximum number of files that the calling process can open.
64 .SH "RETURN VALUE"
65 On success,
66 .B ulimit
67 returns a nonnegative value.
68 On error, \-1 is returned, and
69 .I errno
70 is set appropriately.
71 .SH ERRORS
72 .TP
73 .B EPERM
74 A non-root process tried to increase a limit.
75 .SH "CONFORMING TO"
76 SVID.
77 .SH "SEE ALSO"
78 .BR bash (1),
79 .BR getrlimit (2),
80 .BR setrlimit (2),
81 .BR sysconf (3)