...
The following non-compliant code creates some_file
in the /tmp
directory. The name is hard - coded and is thus not unique or unpredictable.
...
For Microsoft Visual Studio 2005, the name generated by tmpnam_s
consists of a program-generated filename and, after the first call to tmpnam_s()
, a file extension of sequential numbers in base 32 (.1-.1vvvvvu, when TMP_MAX_S
in stdio.h
is INT_MAX
).
...
The mktemp()
function was marked LEGACY in the Open Group Base Specifications Issue 6.
...
For glibc versions 2.0.6 and earlier, the file is created with permissions 0666; for glibc versions 2.0.7 and later, the file is created with permissions 0600. On NetBSD, the file is created with permissions 0600.
...