Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

getenv(3) OSS 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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
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
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 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.
332 Hewlett-Packard Company 527187-017