Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2003 23:58:02 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Wes Peters <wes@softweyr.com>, arch@FreeBSD.ORG
Subject:   Re: NEWSYSLOG changes, nosignal & -Rotate
Message-ID:  <p05200f23ba81f4af4286@[128.113.24.47]>
In-Reply-To: <p05200f22ba81b269ba0f@[128.113.24.47]>
References:  <20030210114930.GB90800@melusine.cuivre.fr.eu.org> <p05200f08ba7b59fffe0a@[128.113.24.47]> <p05200f1fba807dbb60c0@[128.113.24.47]> <200302251255.48219.wes@softweyr.com> <p05200f22ba81b269ba0f@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
At 7:18 PM -0500 2/25/03, Garance A Drosihn wrote:
>Well, I'm seriously thinking of redoing the -R update a little,
>and have a separate option to say "do not signal".

I have two different updates now, to replace the one I previously
posted.  To avoid the problem where my messages sometimes disappear
when I include the patch in them, here's the location of the two
patches:

http://people.freebsd.org/~gad/newsyslog/1-nosig.diff
http://people.freebsd.org/~gad/newsyslog/2-rotate.diff

The first one adds a '-s' option to the newsyslog command, which
indicates that newsyslog should NOT send signals to any processes
if it has to rotate some log files.  It also adds the 'N' or 'n'
option to the flags-field of entries in /etc/newsyslog.conf, which
indicates that the specific entry has no process which needs to be
signalled.  For instance, right now the distributed newsyslog.conf
file has entries for files like /var/log/daily.log, and I doubt
that syslogd needs to be HUP'ed whenever that file is rotated.

Both -s and the 'N' flag are based on options in NetBSD's version
of newsyslog.  I am tempted to pick some other option, say '-Q'
plus 'Q' or 'q' for flags, so that the same letter will be used in
the config file or when specified on the command.  I would keep
the netbsd letters, but only document the new letter.  It would
be very easy to talk me into doing this...  <hint hint>

The nosig patch includes a little cleanup in areas I was touching
anway, which are done with an eye towards future updates (such
as the -R update...).

The second update is basically the same as my previous posting
of the -R option, except that the newer implementation *does*
send a signal by default.  Callers of newsyslog who do not want
the signal would add the '-s' (or '-Q'?) option.

These updates have not been tested much.  I intend to commit
them next Sunday, assuming they work in my testing and no one
has any additional feedback on them.  They assume you're running
the up-to-the-minute version of newsyslog in -current.

newsyslog itself has a number of subtle and not-so-subtle bugs
in it, so I expect to be writing up more updates after these.
One bug which was cleaned up as part of the nosig patch is that
it currently accepts either capital-G or lowercase-c (instead of
lowercase-g) as the flags to indicate the entry is a glob-pattern.
I still accept 'c', but warn about it.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f23ba81f4af4286>