diff options
author | Reuben Thomas <rrt@sc3d.org> | 2011-04-27 14:30:31 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-04-27 08:16:19 -0600 |
commit | ca1502f78a51c83c3443b3f3cdffdca39cdedf40 (patch) | |
tree | d5398b9c7d900dc57628c2519c33f8cca5429bee /lib | |
parent | 599fce2bd8c4d3b229d64761c730535a0d13ecff (diff) | |
download | gnulib-ca1502f78a51c83c3443b3f3cdffdca39cdedf40.tar.gz |
mkstemp: mention clean-temp module
* lib/mkstemp.c: Add comment.
* doc/posix-functions/mkstemp.texi (mkstemp): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkstemp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mkstemp.c b/lib/mkstemp.c index b0a8df306a..3c8437e5a4 100644 --- a/lib/mkstemp.c +++ b/lib/mkstemp.c @@ -38,7 +38,11 @@ /* Generate a unique temporary file name from XTEMPLATE. The last six characters of XTEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. - Then open the file and return a fd. */ + Then open the file and return a fd. + + If you are creating temporary files which will later be removed, + consider using the clean-temp module, which avoids several pitfalls + of using mkstemp directly. */ int mkstemp (char *xtemplate) { |