NAME
ulimit - Sets and gets user limits
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <ulimit.h>
long ulimit (
int command,
off_t new_limit,
... );
PARAMETERS
command Specifies the form of control. The command parame-
ter values follow:
UL_GETFSIZE
Returns the process file size limit. The
limit is in units of UBSIZE blocks (see
the sys/param.h file) and is inherited
by child processes. Files of any size
can be read.
UL_SETFSIZE
Sets the process file size limit for
output operations to the value of the
new_limit parameter, and returns the new
file size limit. Any process can
decrease this limit, but only a process
with superuser privilege can increase
the limit.
GET_GETBREAK
Returns the maximum possible break value
(described in the brk() and sbrk() func-
tions).
new_limit Specifies the new limit. Currently, this parame-
ter is significant only for UL_SETFSIZE.
DESCRIPTION
The ulimit() function controls process limits.
For the purposes of future expansion, the ulimit() function
accepts a variable number of arguments, but currently only
the first argument is significant. During access to remote
files, the process limits of the local node are used.
NOTES
The ulimit() function is implemented in terms of setr-
limit(); therefore, the two interfaces should not be used in
the same program. The result of doing so is undefined.
AES Support Level:
Trial use
RETURN VALUES
The UL_GETFSIZE and UL_GETBREAK commands return the
requested process limits. The UL_SETFSIZE command, when
successful, returns an arbitrary nonnegative value. If the
ulimit() function fails, a value of -1 is returned and errno
is set to indicate the error.
ERRORS
If the ulimit() function fails, the limit remains unchanged
and errno is be set to one of the following values:
[EPERM] A process without appropriate system privilege
attempts to increase the file size limit.
[EINVAL] The command parameter is invalid.
RELATED INFORMATION
Functions: brk(2), getrlimit(2), pathconf(3), write(2)
Acknowledgement and Disclaimer