ulimit(3) — Subroutines
OSF
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
commandSpecifies the form of control. The command parameter 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() functions).
new_limitSpecifies the new limit. Currently, this parameter 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 setrlimit(); 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)