Ben Morrow <ben@morrow.me.uk> wrote: > (It's really annoying there > isn't a flink(2) syscall, which would let you unlink the tempfile right > away and then link it in place atomically at the end.) This is somewhat off-topic, but still: if such a syscall existed, I think it would be a security hole. Consider a file descriptor inherited on exec, and opened on a file which lives in a directory on which you don't have execute permission. If you could create additional links to that file, in arbitrary directories on the same filesystem, you could make that file visible to other processes which shouldn't be able to see it. In the absence of flink(2), the opening process can safely arbitrate access to the file in question. -- Aaron Crane ** http://aaroncrane.co.uk/Thread Previous | Thread Next