Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2011 00:03:18 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/usr.bin/sed main.c
Message-ID:  <201101080003.p0803dfJ099812@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jilles      2011-01-08 00:03:18 UTC

  FreeBSD src repository

  Modified files:
    usr.bin/sed          main.c 
  Log:
  SVN rev 217133 on 2011-01-08 00:03:18Z by jilles
  
  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
  
  Revision  Changes    Path
  1.45      +21 -4     src/usr.bin/sed/main.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101080003.p0803dfJ099812>