summaryrefslogtreecommitdiffstats
path: root/man3/getcwd.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getcwd.3')
-rw-r--r--man3/getcwd.334
1 files changed, 17 insertions, 17 deletions
diff --git a/man3/getcwd.3 b/man3/getcwd.3
index 6ba1e3280..c45f9b25a 100644
--- a/man3/getcwd.3
+++ b/man3/getcwd.3
@@ -28,7 +28,7 @@ Standard C library
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR get_current_dir_name ():
@@ -75,7 +75,7 @@ buffer if necessary.
As an extension to the POSIX.1-2001 standard, glibc's
.BR getcwd ()
allocates the buffer dynamically using
-.BR malloc (3)
+.MR malloc 3
if
.I buf
is NULL.
@@ -87,12 +87,12 @@ is zero, when
.I buf
is allocated as big as necessary.
The caller should
-.BR free (3)
+.MR free 3
the returned buffer.
.P
.BR get_current_dir_name ()
will
-.BR malloc (3)
+.MR malloc 3
an array big enough to hold the absolute pathname of
the current working directory.
If the environment
@@ -100,12 +100,12 @@ variable
.B PWD
is set, and its value is correct, then that value will be returned.
The caller should
-.BR free (3)
+.MR free 3
the returned buffer.
.P
.BR getwd ()
does not
-.BR malloc (3)
+.MR malloc 3
any memory.
The
.I buf
@@ -123,7 +123,7 @@ is set to
.B PATH_MAX
may not be a compile-time constant;
furthermore, its value may depend on the filesystem, see
-.BR pathconf (3).)
+.MR pathconf 3 .)
For portability and security reasons, use of
.BR getwd ()
is deprecated.
@@ -184,7 +184,7 @@ working directory, including the terminating null byte.
You need to allocate a bigger array and try again.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
-.BR attributes (7).
+.MR attributes 7 .
.TS
allbox;
lbx lb lb
@@ -241,7 +241,7 @@ the pathname returned by the
system call will be prefixed with the string "(unreachable)"
if the current directory is not below the root directory of the current
process (e.g., because the process set a new filesystem root using
-.BR chroot (2)
+.MR chroot 2
without changing its current directory into the new root).
Such behavior can also be caused by an unprivileged user by changing
the current directory into another mount namespace.
@@ -287,7 +287,7 @@ These functions are often used to save the location of the current working
directory for the purpose of returning to it later.
Opening the current
directory (".") and calling
-.BR fchdir (2)
+.MR fchdir 2
to return is usually a faster and more reliable alternative when sufficiently
many file descriptors are available, especially on platforms other than Linux.
.SH BUGS
@@ -302,10 +302,10 @@ calling
from such a pathname will now result in failure with
.BR ENOENT .
.SH SEE ALSO
-.BR pwd (1),
-.BR chdir (2),
-.BR fchdir (2),
-.BR open (2),
-.BR unlink (2),
-.BR free (3),
-.BR malloc (3)
+.MR pwd 1 ,
+.MR chdir 2 ,
+.MR fchdir 2 ,
+.MR open 2 ,
+.MR unlink 2 ,
+.MR free 3 ,
+.MR malloc 3