diff options
author | ngie <ngie@FreeBSD.org> | 2015-11-15 20:14:54 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-11-15 20:14:54 +0000 |
commit | 9f04bb19d0b5ef7a7fd40e485996c863efc629fc (patch) | |
tree | 37ce9a95b0fe75f565cc1d2b10796d5f453f1011 /lib/libc/stdio/asprintf.c | |
parent | 3491a2df41fa2dd52dbf6a50486267817ae4fadf (diff) | |
download | FreeBSD-src-9f04bb19d0b5ef7a7fd40e485996c863efc629fc.zip FreeBSD-src-9f04bb19d0b5ef7a7fd40e485996c863efc629fc.tar.gz |
MFC r289896:
Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script
The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.
Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
0 files changed, 0 insertions, 0 deletions