Re: temp files under C
Brian May <bam@debian.org> writes:
> what is the safest way to open/create a temporary file under C, and
> get a string with the filename?
Other posters have given good suggestions. I'll give one more:
you can safely use mkdir() to create a directory with secure
permissions, because mkdir() will fail if there is an existing
file (or even a symlink) with the given name. Then you can
safely create any number of temporary files, with arbitrary
convenient names, within the new directory.
Reply to: