.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Moved to man3, aeb, 980612 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH ULIMIT 3 2017\-09\-15 Linux "Linux 程式設計師手冊" .SH 名稱 ulimit \- 獲取並設定使用者限制 .SH 概述 \fB#include \fP .PP \fBlong ulimit(int \fP\fIcmd\fP\fB, long \fP\fInewlimit\fP\fB);\fP .SH 描述 警告:該例程已過時。請使用 \fBgetrlimit\fP(2)、\fBsetrlimit\fP(2) 和 \fBsysconf\fP(3) 代替。有關 shell 命令 \fBulimit\fP() 請參見 \fBbash\fP(1)。 .PP \fBulimit\fP() 呼叫可以獲取或設定呼叫程序的某些限制。\fIcmd\fP 引數可以取如下的值。 .TP \fBUL_GETFSIZE\fP 返回檔案大小相關的限制,單位為 512 位元組。 .TP \fBUL_SETFSIZE\fP 設定檔案大小相關的限制。 .TP \fB3\fP (Linux 未實現。)返回資料段可能的最大地址。 .TP \fB4\fP (已實現,但未提供符號常量。)返回呼叫程序可以開啟檔案的最大數量。 .SH 返回值 如果成功,\fBulimit\fP() 返回非零值。如果出錯,返回值為 \-1,且將相應設定 \fIerrno\fP 的值。 .SH 錯誤 .TP \fBEPERM\fP 一個無許可權的程序嘗試提升限制。 .SH 屬性 如需瞭解本節中所使用術語的解釋,請檢視 \fBattributes\fP(7)。 .TS allbox; lb lb lb l l l. 介面 屬性 值 T{ \fBulimit\fP() T} 執行緒安全性 多執行緒安全 .TE .sp 1 .SH 遵循標準 SVr4,POSIX.1\-2001。POSIX.1\-2008 將 \fBulimit\fP() 標記為過時。 .SH 參見 \fBbash\fP(1), \fBgetrlimit\fP(2), \fBsetrlimit\fP(2), \fBsysconf\fP(3) .SH 註記 此頁面是 Linux \fIman\-pages\fP 專案 5.10 版的一部分。您可以訪問 \%https://www.kernel.org/doc/man\-pages/ 來了解專案的描述、報告問題的方法和此頁面的最新版本。 .SH "跋" .br 本頁面中文版由中文 man 手冊頁計劃提供。 .br 中文 man 手冊頁計劃:\fBhttps://github.com/man-pages-zh/manpages-zh\fR