ULIMIT(2) — HP-UX
NAME
ulimit − get and set user limits
SYNOPSIS
long ulimit (cmd, newlimit)
int cmd;
long newlimit;
DESCRIPTION
This function provides for control over process limits. The cmd values available are:
1 Get the file size limit of the process. The limit is in units of 512-byte blocks and is inherited by child processes. Files of any size can be read.
2 Set the file size limit of the process to the value of newlimit. Any process may decrease this limit, but only a process with an effective user ID of super-user may increase the limit. Note that the limit must be specified in units of 512-byte blocks.
3 Get the maximum possible break value. See brk(2). Depending on system resources such as swap space, this maximum may not be attainable at a given time.
ERRORS
Ulimit will fail if one or more of the following conditions is true.
[EINVAL] cmd is not in the correct range.
[EPERM] Ulimit will fail and the limit will be unchanged if a process with an effective user ID other than super-user attempts to increase its file size limit.
RETURN VALUE
Upon successful completion, a non-negative value is returned. Errors return a -1, with errno set appropriately.
SEE ALSO
Hewlett-Packard Company — Version B.1, May 11, 2021