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 Species 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 Species the lename of the standard input le.
STDOUT Species the lename of the standard output le.
STDERR Species the lename of the standard error le.
DEFAULTS Species the default volume and subvolume names used to qualify partial
lenames.
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 modied 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
specication.
316 Hewlett-Packard Company 527192-005