Date: Thu, 7 Aug 1997 21:21:01 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@hub.freebsd.org, j@uriah.heep.sax.de Subject: Re: bin/4238: chpass only occasionally works in conjunction with ed Message-ID: <199708071121.VAA27339@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> UTSL. You could have easily found the reason yourself:
>
> if (begin.st_mtime == end.st_mtime) {
> warnx("no changes made");
> pw_error(NULL, 0, 0);
> }
>
> That is, the editing process needs to last for at least one second
> right now, in order for chpass(1) to notice the modification on the
> file since it's only done using the file modification timestamp.
Gak. Tests based on timestamps will break when the hardare becomes a
little faster. The above test broke about 20 years ago.
> Fix: include st_mtimensec into the consideration.
Won't work; ufs usually writes 0 to the nsec field when it changes a
timestamp. The only exception is that the timestamps for utimes() have
a resolution of 1 usec.
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708071121.VAA27339>
