Subject: Re: CVS commit: basesrc
To: None <sommerfeld@orchard.arlington.ma.us>
From: John Hawkinson <jhawk@MIT.EDU>
List: source-changes
Date: 07/07/2000 12:05:50
In message <20000707160157.1BC652A1B@orchard.arlington.ma.us>, Bill Sommerfeld writes:
>newsyslog should clearly do locking of some sort to prevent it from
>corrupting logfiles.

OK. But that should per-logfile locking.
I should be able to have root run newsyslog with /etc/newsyslog.conf
hourly, and also to be able to have to run newsyslog with some
other frequency on /usr/local/myapp/newsyslog.conf and have them
rotate different logfiles and not interfere with each other.

The code only does the multiple-instance check if running as root.  It
is the case that for the "common" case of multiple newsyslogs, I would
expect them to run as different uids (i.e. myapp runs as uid myapp),
however I don't see why only root is allowed a pidfile (practicalities?).

I also don't think that two simultaneous newsyslog processes doing
different things should interfere with each other if running
contemporaneously.

I'm not sure if per-logfile locking is worth it, so I guess
I cannot findmyself agreeing with your "clearly" without more data.

--jhawk