ULIMIT(2)
NAME
ulimit − get and set user limits
SYNOPSIS
long ulimit (cmd, newlimit)
int cmd;
long newlimit;
HP-UX COMPATIBILITY
Level: HP-UX/RUN ONLY
Origin: System V
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). 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 — last mod. May 11, 2021