On Saturday 17 April 2004 18:00, Matthew Seaman wrote:

> > Adding /var/run/ipmon.pid at the end of newsyslog.conf line above stops
> > the above symptom, but ipmon stopped logging after each rotation.
> This should be the correct thing to do: ipmon should interpret a HUP
> signal to mean 'reopen log files' -- unless it's changed dramatically
> between 4.x and 5.x[*], in which case you'll have to hunt down what
> should be done instead by reading the documentation or the code or
> something.

It does:
                       if (donehup) {
                                donehup = 0;
                                if (newlog) {
                                        log = newlog;
                                        newlog = NULL;

static void handlehup(sig)
int sig;
        FILE    *fp;

        signal(SIGHUP, handlehup);
        if (logfile && (fp = fopen(logfile, "a")))
                newlog = fp;
        donehup = 1;

The only codepath I can see, that could cause this behavior, would be if the 
fopen fails, because newsyslog is holding a lock on the file at the time it 
signals ipmon.


FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Sun Apr  4 
02:24:06 CEST 2004     
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG  i386

Attachment: pgp00000.pgp
Description: signature

Reply via email to