Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (g - h) getwd(3)
NAME
getwd - Gets the pathname of the current working directory
LIBRARY
G-series native OSS processes: /G/system/sysnn/zosshsrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosshdll |
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosshdll |
SYNOPSIS
#include <unistd.h>
char *getwd(char *path_name);
PARAMETERS
path_name Is a pointer to an array, which can contain a pathname.
DESCRIPTION
The getwd( ) function copies the absolute pathname of the calling process’s current working
directory to the array pointed to by the path_name parameter.
If the length of this pathname (including the null terminator) is greater than PATH_MAX +1
(including the null byte), the getwd( ) function fails and returns a null pointer.
NOTES
The getwd( ) function can be called by native processes only.
For portability to implementations conforming to earlier versions of the XPG4 specifications,
getcwd( ) is preferred over this function.
RETURN VALUES
On successful completion, the getwd( ) function returns path_name. Otherwise, it returns a null
pointer, and the array pointed to by path_name has undefined contents.
ERRORS
None. This function does not set errno.
RELATED INFORMATION
Functions: getcwd(3).
527187-017 Hewlett-Packard Company 3−157