ulimit - get and set user limits
long ulimit(cmd, newlimit)
This function is included for System V compatibility.
This routine provides for control over process limits. The cmd values
1 Get 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.
2 Set the process's file size limit 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. ulimit() will fail and the limit will be unchanged
if a process with an effective user ID other than the
super-user attempts to increase its file size limit.
3 Get the maximum possible break value. See brk(2).
4 Get the size of the process' file descriptor table, as
returned by getdtablesize(2).
Upon successful completion, a non-negative value is returned. Other-
wise a value of -1 is returned and errno is set to indicate the error.
EPERM A user other than the super-user attempted to increase
the file size limit.
brk(2), getdtablesize(2), getrlimit(2), write(2V)
21 January 1990 ULIMIT(3C)