get current working directory pathname
char *getwd(char *path_name);
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 path_name argument.
If the length of the pathname of the current working directory is
greater than (PATH_MAX + 1), including the null byte,
then getwd fails and returns a NULL pointer.
for a description of PATH_MAX.)
Upon successful completion, a pointer to the string containing the
absolute pathname of the current working directory is returned.
Otherwise, getwd returns a NULL pointer and the
contents of the array pointed to by path_name are undefined.
For portability to earlier implementations of the UNIX® system,
is preferred over this function.
This routine conforms to X/Open System Interfaces and Headers,
Issue 4, Version 2.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004