.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" 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. .\" .\" Moved to man3, aeb, 980612 .\" .TH ULIMIT 3 "12 June 1998" "Linux 2.0" "Linux Programmer's Manual" .SH NAME ulimit \- 獲取和改變使用者的限制設定 .SH 大綱 .B #include .sp .BI "long ulimit(int " cmd ", long " newlimit ); .SH 描述 警告: 這個函數已經被廢棄. glibc 不再提供這個包含檔案. 使用 getrlimit(2), setrlimit(2) 和 sysconf(3) 代替這個函數. 相關shell命令 .BR ulimit , 參見 .BR bash (1). 使用 .B ulimit 可以獲得或改變當前進程的限制設定. .I cmd 參數可以是下列值中的一個: .TP .B UL_GETFSIZE 返回檔案大小的限制 (以512字節為單位). .TP .B UL_SETFSIZE 設定檔案大小的限制. .TP .B 3 (Linux不支持) 返回數據段可以使用的最大地址. .TP .B 4 (支持,但沒有定義符號常量) 返回調用本函數的進程可以打開的最大檔案數. .SH "返回值" 如果執行成功