Subject: Re: bin/7662: crontab(1) does not always save changed crontab file
To: Andrew Brown <atatat@atatdot.net>
From: Greg A. Woods <woods@most.weird.com>
List: netbsd-bugs
Date: 06/02/1999 15:20:24
[ On Monday, May 31, 1999 at 22:39:42 (-0400), Andrew Brown wrote: ]
> Subject: Re: bin/7662: crontab(1) does not always save changed crontab file
>
> the proposition: simply to adjust the mtime of the temp file back to
> the mtime of the original crontab file being edited.  any saved data
> would automatically move the mtime to "now", providing proff that the
> file was at least saved, if not changed.  then you'd only lose if you
> did two complete edits within one second.  things being what they are,
> i only discovered this bug because i was trying to do one edit within
> a second.

Yes, this does solve this particular sub-class of the "has this file
been written to" problem.  However this only solves the problem if the
parent process has made a copy of the file to be manipulated.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>