diff options
author | jilles <jilles@FreeBSD.org> | 2011-01-08 00:03:18 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-01-08 00:03:18 +0000 |
commit | 6ef9696fb44fbc1b12fdac123542630a9bec6bad (patch) | |
tree | b86c1734dc9ae41a27d4271519188d0056277885 /tools/regression/usr.bin/sed | |
parent | 16de4d95f52c6e680c13464902c761f154b200af (diff) | |
download | FreeBSD-src-6ef9696fb44fbc1b12fdac123542630a9bec6bad.zip FreeBSD-src-6ef9696fb44fbc1b12fdac123542630a9bec6bad.tar.gz |
sed: Try hard links to make -i target available continually.
When creating a backup file, sed renamed the original before renaming the
changed copy into place, leading to a short time when no file with the
original name was present (usually only visible on SMP systems). Try
creating the backup file using a hard link instead, avoiding this problem.
If creating the hard link fails for any reason, fall back to the old rename
method.
When not creating a backup file, sed already renamed the changed copy onto
the original. This remains unchanged.
I am not adding the suppression of redundant fchown/fchmod to this commit,
because FreeBSD appears to check this in the kernel (for msdosfs at least).
PR: bin/153261
Submitted by: Pedro F. Giffuni
Reviewed by: dds (older version)
Obtained from: Illumos
MFC after: 2 weeks
Diffstat (limited to 'tools/regression/usr.bin/sed')
0 files changed, 0 insertions, 0 deletions