C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
A-23
G.3.14 Library Functions
A call to the perror() function prints the textual error message corresponding to the
value of the errno, optionally preceded by a specified string.
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 NonStop S-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. See the Guardian
Procedure Calls Reference Manual.
getenv()
The environment names are always in uppercase. These 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:
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