|
1 | | -.\" Hey Emacs! This file is -*- nroff -*- source. |
2 | | -.\" |
3 | 1 | .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) |
4 | 2 | .\" |
| 3 | +.\" %%%LICENSE_START(VERBATIM) |
5 | 4 | .\" Permission is granted to make and distribute verbatim copies of this |
6 | 5 | .\" manual provided the copyright notice and this permission notice are |
7 | 6 | .\" preserved on all copies. |
8 | 7 | .\" |
9 | 8 | .\" Permission is granted to copy and distribute modified versions of this |
10 | 9 | .\" manual under the conditions for verbatim copying, provided that the |
11 | 10 | .\" entire resulting derived work is distributed under the terms of a |
12 | | -.\" permission notice identical to this one |
13 | | -.\" |
| 11 | +.\" permission notice identical to this one. |
| 12 | +.\" |
14 | 13 | .\" Since the Linux kernel and libraries are constantly changing, this |
15 | 14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no |
16 | 15 | .\" responsibility for errors or omissions, or for damages resulting from |
17 | 16 | .\" the use of the information contained herein. The author(s) may not |
18 | 17 | .\" have taken the same level of care in the production of this manual, |
19 | 18 | .\" which is licensed free of charge, as they might when working |
20 | 19 | .\" professionally. |
21 | | -.\" |
| 20 | +.\" |
22 | 21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
23 | 22 | .\" the source, must acknowledge the copyright and authors of this work. |
| 23 | +.\" %%%LICENSE_END |
24 | 24 | .\" |
25 | 25 | .\" Moved to man3, aeb, 980612 |
26 | 26 | .\" |
27 | | -.TH ULIMIT 3 "12 June 1998" "Linux 2.0" "Linux Programmer's Manual" |
28 | | -.SH NAME |
29 | | -ulimit \- 获取和改变用户的限制设定 |
30 | | -.SH 大纲 |
31 | | -.B #include <ulimit.h> |
32 | | -.sp |
33 | | -.BI "long ulimit(int " cmd ", long " newlimit ); |
| 27 | +.\"******************************************************************* |
| 28 | +.\" |
| 29 | +.\" This file was generated with po4a. Translate the source file. |
| 30 | +.\" |
| 31 | +.\"******************************************************************* |
| 32 | +.TH ULIMIT 3 2017\-09\-15 Linux "Linux 程序员手册" |
| 33 | +.SH 名称 |
| 34 | +ulimit \- 获取并设置用户限制 |
| 35 | +.SH 概述 |
| 36 | +\fB#include <ulimit.h>\fP |
| 37 | +.PP |
| 38 | +\fBlong ulimit(int \fP\fIcmd\fP\fB, long \fP\fInewlimit\fP\fB);\fP |
34 | 39 | .SH 描述 |
35 | | -警告: 这个函数已经被废弃. glibc 不再提供这个包含文件. 使用 getrlimit(2), |
36 | | -setrlimit(2) 和 sysconf(3) 代替这个函数. 相关shell命令 |
37 | | -.BR ulimit , |
38 | | -参见 |
39 | | -.BR bash (1). |
40 | | - |
41 | | -使用 |
42 | | -.B ulimit |
43 | | -可以获得或改变当前进程的限制设定. |
44 | | -.I cmd |
45 | | -参数可以是下列值中的一个: |
46 | | -.TP |
47 | | -.B UL_GETFSIZE |
48 | | -返回文件大小的限制 (以512字节为单位). |
49 | | -.TP |
50 | | -.B UL_SETFSIZE |
51 | | -设定文件大小的限制. |
52 | | -.TP |
53 | | -.B 3 |
54 | | -(Linux不支持) |
55 | | -返回数据段可以使用的最大地址. |
56 | | -.TP |
57 | | -.B 4 |
58 | | -(支持,但没有定义符号常量) |
59 | | -返回调用本函数的进程可以打开的最大文件数. |
60 | | - |
61 | | -.SH "返回值" |
62 | | -如果执行成功, |
63 | | -.BR ulimit() |
64 | | -返回非负值. 如果发生错误,返回\-1并设定 |
65 | | -.I errno |
66 | | -指示错误发生。 |
| 40 | +警告:该例程已过时。请使用 \fBgetrlimit\fP(2)、\fBsetrlimit\fP(2) 和 \fBsysconf\fP(3) 代替。有关 shell 命令 |
| 41 | +\fBulimit\fP() 请参见 \fBbash\fP(1)。 |
| 42 | +.PP |
| 43 | +\fBulimit\fP() 调用可以获取或设置调用进程的某些限制。\fIcmd\fP 参数可以取如下的值。 |
| 44 | +.TP |
| 45 | +\fBUL_GETFSIZE\fP |
| 46 | +返回文件大小相关的限制,单位为 512 字节。 |
| 47 | +.TP |
| 48 | +\fBUL_SETFSIZE\fP |
| 49 | +设置文件大小相关的限制。 |
| 50 | +.TP |
| 51 | +\fB3\fP |
| 52 | +(Linux 未实现。)返回数据段可能的最大地址。 |
| 53 | +.TP |
| 54 | +\fB4\fP |
| 55 | +(已实现,但未提供符号常量。)返回调用进程可以打开文件的最大数量。 |
| 56 | +.SH 返回值 |
| 57 | +如果成功,\fBulimit\fP() 返回非零值。如果出错,返回值为 \-1,且将相应设置 \fIerrno\fP 的值。 |
| 58 | +.SH 错误 |
| 59 | +.TP |
| 60 | +\fBEPERM\fP |
| 61 | +一个无权限的进程尝试提升限制。 |
| 62 | +.SH 属性 |
| 63 | +如需了解本节中所使用术语的解释,请查看 \fBattributes\fP(7)。 |
| 64 | +.TS |
| 65 | +allbox; |
| 66 | +lb lb lb |
| 67 | +l l l. |
| 68 | +接口 属性 值 |
| 69 | +T{ |
| 70 | +\fBulimit\fP() |
| 71 | +T}线程安全性 多线程安全 |
| 72 | +.TE |
| 73 | +.sp 1 |
| 74 | +.SH 遵循标准 |
| 75 | +SVr4,POSIX.1\-2001。POSIX.1\-2008 将 \fBulimit\fP() 标记为过时。 |
| 76 | +.SH 参见 |
| 77 | +\fBbash\fP(1), \fBgetrlimit\fP(2), \fBsetrlimit\fP(2), \fBsysconf\fP(3) |
| 78 | +.SH 注记 |
| 79 | +此页面是 Linux \fIman\-pages\fP 项目 5.10 版的一部分。您可以访问 |
| 80 | +\%https://www.kernel.org/doc/man\-pages/ 来了解项目的描述、报告问题的方法和此页面的最新版本。 |
0 commit comments