]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r289896:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 15 Nov 2015 20:14:54 +0000 (20:14 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 15 Nov 2015 20:14:54 +0000 (20:14 +0000)
commit033f155a805f9c65bc2c1d328a5bc67754e4cd07
tree37ce9a95b0fe75f565cc1d2b10796d5f453f1011
parent6c23429edb4791f647db70cf7d8bdc67cc63d31c
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@290877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/boot/common/newvers.sh