diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2005-10-19 07:07:02 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2005-10-19 07:07:02 +0000 |
| commit | 63aa9df02fee88a559822c460ab5a30f1d8414ee (patch) | |
| tree | fedc607745a57e06a1a541feca62e18d51523ddb /man3/mktemp.3 | |
| parent | e511ffb6bcaa9a584412a95e602435827e302033 (diff) | |
| download | man-pages-63aa9df02fee88a559822c460ab5a30f1d8414ee.tar.gz | |
Automated unformatting of parentheses using unformat_parens.sh
Diffstat (limited to 'man3/mktemp.3')
| -rw-r--r-- | man3/mktemp.3 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/mktemp.3 b/man3/mktemp.3 index 1d781e7083..99ba67aa8c 100644 --- a/man3/mktemp.3 +++ b/man3/mktemp.3 @@ -39,14 +39,14 @@ mktemp \- make a unique temporary file name .BI "char *mktemp(char *" template ); .fi .SH DESCRIPTION -The \fBmktemp()\fP function generates a unique temporary file name +The \fBmktemp\fP() function generates a unique temporary file name from \fItemplate\fP. The last six characters of \fItemplate\fP must be XXXXXX and these are replaced with a string that makes the filename unique. Since it will be modified, .I template must not be a string constant, but should be declared as a character array. .SH "RETURN VALUE" -The \fBmktemp()\fP function returns NULL on error (\fItemplate\fP did not +The \fBmktemp\fP() function returns NULL on error (\fItemplate\fP did not end in XXXXXX) and \fItemplate\fP otherwise. If the call was successful, the last six bytes of \fItemplate\fP will have been modified in such a way that the resulting name is unique @@ -67,12 +67,12 @@ for libc4, libc5, glibc1; glibc2 follows the Single Unix Specification and has the prototype in .IR <stdlib.h> . .SH BUGS -Never use \fBmktemp()\fP. Some implementations follow 4.3BSD +Never use \fBmktemp\fP(). Some implementations follow 4.3BSD and replace XXXXXX by the current process ID and a single letter, so that at most 26 different names can be returned. Since on the one hand the names are easy to guess, and on the other hand there is a race between testing whether the name exists and -opening the file, every use of \fBmktemp()\fP is a security risk. +opening the file, every use of \fBmktemp\fP() is a security risk. The race is avoided by .BR mkstemp (3). .SH "SEE ALSO" |
