vi and file ctime

Ron Stanonik stanonik at nprdc.arpa
Wed Oct 5 06:13:12 AEST 1988


We're running 4.3bsd on a vax 780.  I just noticed that
vi'ing a file changes the ctime of the file . . . even
if the file isn't modified and even if the file isn't
writable.  Digging around I found that vi fsync's the file,
and fsync seems to be the culprit.  fsync results (in the
kernel) in a call to syncip, which sets the ICHG bit in the
inode's i_flag and then calls iupdat, causing the ctime
to be set.

Any reason not to remove the line setting the ICHG bit
in syncip?  Phrased another way, any good reason for
fsync setting the ctime?

Thanks,

Ron Stanonik
stanonik at nprdc.arpa



More information about the Comp.unix.wizards mailing list