On Mon, Oct 29, 2001 at 09:42:19AM -0800, Terry Lambert wrote: > David O'Brien wrote: > > > > On Mon, Oct 29, 2001 at 08:35:35AM -0800, Terry Lambert wrote: > > > > No muss, no fuss. So where is the race? > > > > Mike had the only justification so far -- that of permissions of the > > > > file. > > > > > > Think multiple instances of syslogd. > > > > You are going to have to help me out a little bit more -- I can think of > > no problems with what I proposed vs. the existing way. Both have a race > > of which daemon opens the file first. > > Not if you don't use O_CREAT; then they don't.
Why not? If the file exists and I start up two syslogd's, there is a race of which one open's the file first. If I start up two syslogd's and the file does not exist and then I touch the file. There will be a race if I ``kill -HUP <pid #1> <pid #2>''. If I take care to HUP only one syslogd, move the file to the side, touch the file again and HUP the second syslogd there is no race. I can similarly take this amount of care with the way I would like syslogd to work such that there is no race. -- -- David ([EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message