freebsd-skq/usr.bin/xinstall
bdrewery 032a51f8f0 Fix -S with -b not atomically updating the destination file.
With both of these flags, the backup was created via rename(dest, backup)
followed by rename(tmp, dest).  This left the destination file missing
for a moment which contradicts the point of -S.

This fixes a race with installworld where PRECIOUSPROG and PRECIOUSLIB
files (which use -S for installation) would briefly be missing.  In the
case of installing rtld with parallel installworld it could render an
error due to not having rtld present to run install/cp in another
process.

Reported by:	jhb
Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7451
2016-08-10 18:19:02 +00:00
..
tests install: When preserving timestamps, also copy the nanoseconds part. 2016-06-09 21:59:35 +00:00
install.1 xinstall: renumber UCB clauses to avoid skipping #3 2015-09-25 20:25:18 +00:00
Makefile install: Add some tests. 2016-05-08 21:11:24 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
xinstall.c Fix -S with -b not atomically updating the destination file. 2016-08-10 18:19:02 +00:00