TMPFILE2
if (rename(TMPFILE, TMPFILE2) == -1)
if (symlink(TMPFILE2, TMPFILE) == -1)
if (stat(TMPFILE2, &sb) == -1)
(void)unlink(TMPFILE2);