getwd(3) (BSD Compatibility Package) getwd(3)
NAME
getwd - get current working directory pathname
SYNOPSIS
/usr/ucb/cc [flag ...] file ... -lucb
#include <sys/param.h>
#include <unistd.h>
char *getwd(char *pathname);
DESCRIPTION
The getwd() function determines an absolute pathname of the current
working directory of the calling process, and copies that pathname
into the array pointed to by the pathname argument.
If the length of the pathname of the current working directory is
greater than (MAXPATHLEN + 1) including the null byte, getwd() fails
and returns a null pointer.
RETURN VALUE
Upon successful completion, a pointer to the string containing the
absolute pathname of the current working directory is returned. Other-
wise, getwd() returns a null pointer and the contents of the array
pointed to by pathname are undefined.
SEE ALSO
getcwd(3C).
Page 1 Reliant UNIX 5.44 Printed 11/98