Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
getenv(3) Guardian Native C Library Calls Reference Manual
NAME
getenv - Returns the value of an environment variable
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <stdlib.h>
char *getenv(
const char *name);
PARAMETERS
name Specifies the name of an environment variable.
DESCRIPTION
The getenv() function searches the environment list for a match against name. The name param-
eter is a string of the form name=value or name.
Use From the Guardian Environment
In Guardian processes, the environment list always contains the following four run-time parame-
ters:
STDIN Specifies the filename of the standard input file.
STDOUT Specifies the filename of the standard output file.
STDERR Specifies the filename of the standard error file.
DEFAULTS Specifies the default volume and subvolume names used to qualify partial
filenames.
RETURN VALUES
The getenv() function returns a pointer to a string containing the value in the current environ-
ment, if such a string is present. If such a string is not present, a null pointer is returned.
The returned string should not be modified by the application, and may be overwritten or
changed as a result of the putenv( ) function.
RELATED INFORMATION
Functions: putenv(3).
Miscellaneous: environ(5).
STANDARDS CONFORMANCE
The getenv() function behavior in Guardian processes is an HP extension to the XPG4 Version 2
specification.
3−16 Hewlett-Packard Company 527192-005