create a temporary file with unpredictable name

397 Views Asked by At

When we create temporary files using tmpfile, in most cases we cannot easily predict the name. Coverity scan also complains about its vulnerability. So is there any function to create a temporary file which cannot be guessed easily?

1

There are 1 best solutions below

3
On BEST ANSWER

If you using Linux, then mkstemp

Or use tmpnam