Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

ulimit(2) OSS System Calls Reference Manual
NAME
ulimit - Sets and gets file size limits
LIBRARY
G-series native OSS processes: system library
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <ulimit.h>
long int ulimit(
int cmd [ ,
...
/* long int blk_size
*/
]);
In this instance, the ellipsis ( ...) indicates that the function is variable. An additional,
optional parameter can be specified.
PARAMETERS
cmd Specifies the operation to be performed. The following values are valid:
UL_GETFSIZE
Returns the size limit, in 512-byte blocks, of files opened by the
process for writing in the OSS environment. (Files of any size
can be read in the OSS environment.)
UL_SETFSIZE
Sets the size limit, in 512-byte blocks, of files opened by the pro-
cess for writing in the OSS environment to the value specified as
the second parameter of the call. (Files of any size can be read in
the OSS environment.)
This is a restricted operation. Any process can reduce the size
limit for its files, but only a process with appropriate privileges
can increase the size limit for its files.
blk_size Specifies the number of 512-byte blocks to be permitted in a file written by the
process. This parameter is required when the cmd parameter has the value of
UL_SETFSIZE. This parameter can be omitted in all other calls.
This parameter must be declared as a long int data type.
DESCRIPTION
The ulimit() function provides control over selected process limits. Limits set by calls to the
ulimit() function are inherited by a child process. Limits set by calls to the ulimit() function are
enforced only if the file open was created by the OSS open() or creat() function call.
NOTES
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
RETURN VALUES
Upon successful completion, the ulimit() function returns the value of the requested limit. If
ulimit() fails, the value -1 is returned, and errno is set to indicate the error.
92 Hewlett-Packard Company 527186-023