Subject: Re: newsyslog
To: Andy Doran <>
From: Andrew Brown <>
List: tech-userlevel
Date: 07/12/2000 18:31:31
>Finally, locking. We don't want logs to get mangled, so some form of
>serialization needs to be done. So far I'm thinking create a lock like:

locking?  hmm...what am i missing...?

i always figured that if you

 (1) do all the moves and creation of new (empty) log files
 (2) do all the hupping (syslogd, and others) [*]
 (3) do all the gziping (bzip2ing?)

that there would be no need for locking.  or are you trying to guard
against to instances of newsyslog running simultaneously not stepping
on each other's toes?

[*] the alias in root's .cshrc call 'hup' is not quite correct (imho).
it's currently:

   alias hup 'kill -HUP `cat /var/run/\!$.pid`'

but i feel that

   alias hup 'kill -HUP `head -1 /var/run/\!$.pid`'

would be better, since some things (sendmail, others?) store more than
just a pid in there.  unless, of course, i'm simply expected to ignore
the errors that kill gives me from that.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."