Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b9ed2f

Browse files
committed
Clarified documentation of tempnam().
Closes SF bug #635656.
1 parent cab94a1 commit 4b9ed2f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/lib/libos.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,10 @@ \subsection{Files and Directories \label{os-file-dir}}
972972
filename. Applications are responsible for properly creating and
973973
managing files created using paths returned by \function{tempnam()};
974974
no automatic cleanup is provided.
975+
On \UNIX, the environment variable \envvar{TMPDIR} overrides
976+
\var{dir}, while on Windows the \envvar{TMP} is used. The specific
977+
behavior of this function depends on the C library implementation;
978+
some aspects are underspecified in system documentation.
975979
\warning{Use of \function{tempnam()} is vulnerable to symlink attacks;
976980
consider using \function{tmpfile()} instead.}
977981
Availability: \UNIX, Windows.

0 commit comments

Comments
 (0)