diff options
author | phk <phk@FreeBSD.org> | 1995-02-05 18:14:38 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-02-05 18:14:38 +0000 |
commit | 184bec765aac624f0470893fc81e0ec11590fa39 (patch) | |
tree | fece5ed09e9d9dbbe59cc7bf8b945b6ef4c41ec7 /lib/libc/gen/getcwd.3 | |
parent | 88fa097b585ec0f68865d5f9d93a9c7dd89d795b (diff) | |
download | FreeBSD-src-184bec765aac624f0470893fc81e0ec11590fa39.zip FreeBSD-src-184bec765aac624f0470893fc81e0ec11590fa39.tar.gz |
Document the getenv(PWD) feature.
Diffstat (limited to 'lib/libc/gen/getcwd.3')
-rw-r--r-- | lib/libc/gen/getcwd.3 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/gen/getcwd.3 b/lib/libc/gen/getcwd.3 index b66aa1c..10ae3cd 100644 --- a/lib/libc/gen/getcwd.3 +++ b/lib/libc/gen/getcwd.3 @@ -46,7 +46,7 @@ .Sh DESCRIPTION The .Fn getcwd -function copies the absolute pathname of the current working directory +function copies an absolute pathname of the current working directory into the memory referenced by .Fa buf and returns a pointer to @@ -89,6 +89,12 @@ open the current directory and use the .Xr fchdir 2 function to return. +.Pp +These routines examine the the environment variable PWD, +if it is an absolute path for the current directory, +that path will be returned. +Consequently, if the ``canonical'' name of the current directory is +needed, unset the PWD environment variable before calling these routines. .Sh RETURN VALUES Upon successful completion, a pointer to the pathname is returned. Otherwise a |