ulimit(2)
NAME
ulimit − get and set user limits
SYNTAX
long ulimit (cmd, newlimit)
int cmd;
long newlimit;
DESCRIPTION
This function provides control over process limits. An explanation of the cmd values follow.
ValueExplanation
1Get the process’s file size limit. The limit is in units of 512-byte blocks and is inherited by child processes. Files of any size can be read.
2Set the process’s file size limit to the value of newlimit. Any process can decrease this limit, but only a process with an effective user ID of superuser can increase the limit. The ulimit system call fails and the limit remains unchanged if a process with an effective user ID other than superuser attempts to increase its file size limit.
3Get the maximum possible break value. For further information, see brk(.).
RETURN VALUE
Upon successful completion, a nonnegative value is returned. Otherwise, a value of −1 is returned and errno is set to indicate the error.
SEE ALSO
System Calls