2004-11-03 13:51:07 +00:00
|
|
|
.\" 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.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" 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.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" 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
|
|
|
|
.\"
|
2008-08-06 12:45:41 +00:00
|
|
|
.TH ULIMIT 3 2008-08-06 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
ulimit \- get and set user limits
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <ulimit.h>
|
|
|
|
.sp
|
|
|
|
.BI "long ulimit(int " cmd ", long " newlimit );
|
|
|
|
.SH DESCRIPTION
|
2007-04-12 22:42:49 +00:00
|
|
|
Warning: This routine is obsolete.
|
|
|
|
Use
|
|
|
|
.BR getrlimit (2),
|
2007-06-16 08:49:40 +00:00
|
|
|
.BR setrlimit (2),
|
2007-04-12 22:42:49 +00:00
|
|
|
and
|
2005-10-19 14:48:35 +00:00
|
|
|
.BR sysconf (3)
|
2004-11-03 13:51:07 +00:00
|
|
|
instead.
|
|
|
|
For the shell command
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR ulimit (),
|
2004-11-03 13:51:07 +00:00
|
|
|
see
|
|
|
|
.BR bash (1).
|
|
|
|
|
|
|
|
The
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR ulimit ()
|
2007-12-27 16:06:35 +00:00
|
|
|
call will get or set some limit for the calling process.
|
2004-11-03 13:51:07 +00:00
|
|
|
The
|
|
|
|
.I cmd
|
|
|
|
argument can have one of the following values.
|
|
|
|
.TP
|
2007-04-12 22:42:49 +00:00
|
|
|
.B UL_GETFSIZE
|
2004-11-03 13:51:07 +00:00
|
|
|
Return the limit on the size of a file, in units of 512 bytes.
|
|
|
|
.TP
|
|
|
|
.B UL_SETFSIZE
|
|
|
|
Set the limit on the size of a file.
|
|
|
|
.TP
|
|
|
|
.B 3
|
|
|
|
(Not implemented for Linux.)
|
|
|
|
Return the maximum possible address of the data segment.
|
|
|
|
.TP
|
|
|
|
.B 4
|
|
|
|
(Implemented but no symbolic constant provided.)
|
|
|
|
Return the maximum number of files that the calling process can open.
|
|
|
|
.SH "RETURN VALUE"
|
|
|
|
On success,
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR ulimit ()
|
_syscall.2, accept.2, epoll_create.2, inotify_add_watch.2, ioctl.2, msgget.2, msgop.2, open.2, prctl.2, sched_setscheduler.2, semctl.2, semget.2, swapon.2, addseverity.3, cacosh.3, csqrt.3, dirfd.3, drand48.3, fputws.3, mq_send.3, posix_openpt.3, puts.3, sched_getcpu.3, shm_open.3, sqrt.3, sysconf.3, tgamma.3, ulimit.3, credentials.7, svipc.7: Global fix: s/non-negative/nonnegative/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:44:48 +00:00
|
|
|
returns a nonnegative value.
|
2004-11-03 13:51:07 +00:00
|
|
|
On error, \-1 is returned, and
|
|
|
|
.I errno
|
|
|
|
is set appropriately.
|
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
|
|
|
.B EPERM
|
2010-01-16 17:24:09 +00:00
|
|
|
A unprivileged process tried to increase a limit.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "CONFORMING TO"
|
2006-08-03 13:57:30 +00:00
|
|
|
SVr4, POSIX.1-2001.
|
2008-08-06 12:44:31 +00:00
|
|
|
POSIX.1-2008 marks
|
2008-08-06 12:44:46 +00:00
|
|
|
.BR ulimit ()
|
2008-08-06 12:44:31 +00:00
|
|
|
as obsolete.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR bash (1),
|
|
|
|
.BR getrlimit (2),
|
|
|
|
.BR setrlimit (2),
|
|
|
|
.BR sysconf (3)
|