get and set user limits
cc . . . -lc
long int ulimit(int cmd, ... );
The ulimit routine examines or changes process' file size limits.
The cmd values available are:
Return the process's regular file size limit
in units of 512-byte blocks.
The regular file size limit is inherited by child processes.
Files of any size may be read.
Set the regular file size limit for output operations of the process to the
value of the optional second argument (must be of type long).
Any process may decrease its own file size limit, but only a process with
an effective user ID of super user may increase the
limit. The new file size limit is returned by the routine.
Upon successful completion, the ulimit
routine returns the value of the limit requested.
If the routine fails, ulimit returns a value of -1 and
errno is set to indicate the appropriate error.
If one of the following conditions occurs,
the ulimit routine fails (no values will be changed)
and errno is set to the corresponding value:
The cmd argument is invalid.
A process with an effective user
ID other than super user attempted to increase its
regular file size limit.
ulimit conforms with:
X/Open Portability Guide, Issue 3, 1989
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003