They didn't get it right on the first try. But the reason mktemp is even mentioned is that we need a tmp-creator that works on all OSs regardless of avilability of atomic syscalls. It would however be prudent to to make one extra function that will fail if it can't do it atomicly.