C/C++ Programmer's Guide (G06.25+)
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
A-23
G.3.14 Library Functions
Memory
The behavior of the calloc(), malloc(), or realloc() function if the size
requested is zero is:
•
In the Guardian environment, calloc(), malloc(), and realloc() abort with
runtime error 40.
•
In the OSS environment on G-series systems, calloc(), malloc(), and
realloc() return a non-NULL pointer. These pointers should not be
dereferenced.
abort()
When the abort() function is called, all open and temporary files are closed. The
temporary files are deleted.
exit()
The status returned by the exit() function if the value of the argument is other than
zero, EXIT_SUCCESS, or EXIT_FAILURE is:
If the value is negative, the exit() function will return EXIT_FAILURE.
If the value is positive, the exit condition code is equal to status. Refer to the Guardian
Procedure Calls Reference Manual.
getenv()
The environment names are always in uppercase. The following four run-time
parameters are always present:
To alter the environment list obtained by a call to the getenv() function, use the
PARAM command, the syntax for which is as follows:
param_name
is the run-time environment parameter name
Parameter Description
STDIN Gives the name of the standard input file, stdin.
STDOUT Gives the name of the standard output file, stdout.
STDERR Gives the name of the standard error file, stderr.
DEFAULTS Gives the default volume and subvolume names used to qualify partial file
names.
PARAM param_name param_setting