Thread (1 message) 1 message, 1 author, 2016-06-15

Re: fix mktemp (remove mktemp ;)

From: Florian Weimer <hidden>
Date: 2016-06-15 22:41:53

* Herbert Xu:
Paul Jackson [off-list ref] wrote:
quoted
Even mktemp(1) can collide, in theory, since there is no practical way
in shell scripts to hold open and locked the file from the instant of it
is determined to be a unique name.
mktemp(1) creates the file before exiting.  Other instances of mktemp(1)
cannot successfully create the same file (they all use O_EXCL).
Therefore this race does not exist, even in theory :)
/tmp cleaners exist, but the risks are minimal for programs which
aren't SUID/SGID.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help