summaryrefslogtreecommitdiffstats
path: root/man3/tempnam.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/tempnam.3')
-rw-r--r--man3/tempnam.330
1 files changed, 15 insertions, 15 deletions
diff --git a/man3/tempnam.3 b/man3/tempnam.3
index f9821896b..93defc8a9 100644
--- a/man3/tempnam.3
+++ b/man3/tempnam.3
@@ -18,7 +18,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 tempnam ():
@@ -31,9 +31,9 @@ Feature Test Macro Requirements for glibc (see
.SH DESCRIPTION
.I "Never use this function."
Use
-.BR mkstemp (3)
+.MR mkstemp 3
or
-.BR tmpfile (3)
+.MR tmpfile 3
instead.
.P
The
@@ -77,9 +77,9 @@ Finally an implementation-defined directory may be used.
The string returned by
.BR tempnam ()
is allocated using
-.BR malloc (3)
+.MR malloc 3
and hence should be freed by
-.BR free (3).
+.MR free 3 .
.SH RETURN VALUE
On success, the
.BR tempnam ()
@@ -93,7 +93,7 @@ set to indicate the error.
Allocation of storage failed.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
-.BR attributes (7).
+.MR attributes 7 .
.TS
allbox;
lbx lb lb
@@ -118,17 +118,17 @@ it is nevertheless possible that between the time that
.BR tempnam ()
returns a pathname, and the time that the program opens it,
another program might create that pathname using
-.BR open (2),
+.MR open 2 ,
or create it as a symbolic link.
This can lead to security holes.
To avoid such possibilities, use the
-.BR open (2)
+.MR open 2
.B O_EXCL
flag to open the pathname.
Or better yet, use
-.BR mkstemp (3)
+.MR mkstemp 3
or
-.BR tmpfile (3).
+.MR tmpfile 3 .
.P
SUSv2 does not mention the use of
.BR TMPDIR ;
@@ -141,7 +141,7 @@ On SVr4, the directory used under \fBd)\fP is
Because it dynamically allocates memory used to return the pathname,
.BR tempnam ()
is reentrant, and thus thread safe, unlike
-.BR tmpnam (3).
+.MR tmpnam 3 .
.P
The
.BR tempnam ()
@@ -169,7 +169,7 @@ upon failure to find a unique name.
The precise meaning of "appropriate" is undefined;
it is unspecified how accessibility of a directory is determined.
.SH SEE ALSO
-.BR mkstemp (3),
-.BR mktemp (3),
-.BR tmpfile (3),
-.BR tmpnam (3)
+.MR mkstemp 3 ,
+.MR mktemp 3 ,
+.MR tmpfile 3 ,
+.MR tmpnam 3