Hi Hans! On Sa, 17 Nov 2007, Hans Hagen wrote:
maybe it opens a file just to be sure that the name is indeed reserved an dnot taken by another process in tne meantime, so os.tmpdir() is
Yes, otherwise it would be racy, some other process could make a symlink attack whatever you have in your home dir.
needed; i wonder, maybe it makse sense to accept an optional argument that for the root so that one can generate a tmpdir at a specific location i.e. tmpdir("/tmp") or so
mkstemp and mkdtemp (section 3)
allow for templates. Or the shell function
mktemp
allows for templates and creation of dirs/files.
But are mkdtemp and mkstemp available everywhere we want to compile
luatex?
The man page of mkdtemp(3) is not very inviting:
VERSIONS
Available since glibc 2.1.91.
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining