Open System Services System Calls Reference Manual (G06.25+, H06.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 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.
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.
ERRORS
If any of the following conditions occurs, the ulimit() function sets errno to the value that
corresponds to the condition.
[EINVAL] One of the following conditions exists:
9−2 Hewlett-Packard Company 527186-003