These routines have traditionally been used by programs to save the name of a working directory for the purpose of returning to it. Upon successful completion, a pointer to the pathname is returned. Oth- erwise a NULL pointer is returned and the global variable errno is set to indicate the error. The size argument is zero. A component of the pathname no longer exists.
Insufficient memory is available.
The size argument is greater than zero but smaller than the length of the pathname plus 1.