Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Re: [PATCH] innfeed does not reopen (rotated) log file
(Julien ?LIE)
2. Re: [PATCH] innfeed does not reopen (rotated) log file
(Russ Allbery)
3. Re: [PATCH] innfeed does not reopen (rotated) log file
(Julien ?LIE)
4. Re: [PATCH] innfeed does not reopen (rotated) log file
(Russ Allbery)
----------------------------------------------------------------------
Message: 1
Date: Mon, 07 Jan 2013 19:47:18 +0100
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: [PATCH] innfeed does not reopen (rotated) log file
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Russ,
>>> I just noticed that innfeed keeps open a deleted log/innfeed.log, while
>>> the current log/innfeed.log as well as all the available OLD logs are
>>> empty!
>>>
>>> The reason seems to be that rotation of innfeed.log was added to
>>> scanlogs for INN 2.5, but scanlogs doesn't send a signal for innfeed to
>>> reopen its log; and indeed there is (currently) no way to cause a
>>> running innfeed to do so.
>
> I have (finally) applied this patch to CURRENT and to the 2.5 branch.
> Thanks! It's less than ideal, since innfeed really needs some mechanism
> to let go of that file, but it's better than what we're currently doing.
In innfeed/main.c, there is an openLogFile() function that does a
freopen() of the innfeed log file.
Couldn't we just add a call to openLogFile() in the existing sighup()
function in main.c? This sighup() function currently reloads
innfeed.conf and reconfigure hosts.
static void sighup (int sig UNUSED)
{
notice ("ME reloading config file %s", configFile) ;
if (!readConfig (configFile,NULL,false,loggingLevel > 0))
{
die ("ME config aborting, error parsing config file") ;
}
configHosts (talkToSelf) ;
}
We could either add openLogFile() here or create a new signal handler like:
setSigHandler(SIGUSR1, sigusr1);
static void sigusr1 (int sig UNUSED)
{
notice ("ME reloading log file %s", logFile) ;
openLogFile();
}
I do not know, though, whether SIGUSR1 is portable...
--
Julien ?LIE
? Ex nihilo nihil. ? (Perse)
------------------------------
Message: 2
Date: Mon, 07 Jan 2013 10:53:56 -0800
From: Russ Allbery <[email protected]>
To: [email protected]
Subject: Re: [PATCH] innfeed does not reopen (rotated) log file
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Julien ?LIE <[email protected]> writes:
> In innfeed/main.c, there is an openLogFile() function that does a
> freopen() of the innfeed log file.
> Couldn't we just add a call to openLogFile() in the existing sighup()
> function in main.c? This sighup() function currently reloads
> innfeed.conf and reconfigure hosts.
Ah, yes, that sounds right to me. That would indeed fix the problem, and
I don't see any drawbacks to adding it to the existing sighup handler.
That's quite a bit simpler than I was expecting!
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
------------------------------
Message: 3
Date: Mon, 07 Jan 2013 20:16:34 +0100
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: [PATCH] innfeed does not reopen (rotated) log file
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi Russ,
>> In innfeed/main.c, there is an openLogFile() function that does a
>> freopen() of the innfeed log file.
>
>> Couldn't we just add a call to openLogFile() in the existing sighup()
>> function in main.c? This sighup() function currently reloads
>> innfeed.conf and reconfigure hosts.
>
> Ah, yes, that sounds right to me. That would indeed fix the problem, and
> I don't see any drawbacks to adding it to the existing sighup handler.
> That's quite a bit simpler than I was expecting!
The only issue I could think of is that the current sighup() function
reloads innfeed.conf. This file would therefore be reloaded everyday,
which might cause a problem if it has changed and the news administrator
still has not wanted to reload it. An automatic reload of innfeed.conf
would then have innfeed shut down (if for instance the syntax of the new
innfeed.conf file is wrong).
--
Julien ?LIE
? Ex nihilo nihil. ? (Perse)
------------------------------
Message: 4
Date: Mon, 07 Jan 2013 11:22:59 -0800
From: Russ Allbery <[email protected]>
To: [email protected]
Subject: Re: [PATCH] innfeed does not reopen (rotated) log file
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Julien ?LIE <[email protected]> writes:
> The only issue I could think of is that the current sighup() function
> reloads innfeed.conf. This file would therefore be reloaded everyday,
> which might cause a problem if it has changed and the news administrator
> still has not wanted to reload it. An automatic reload of innfeed.conf
> would then have innfeed shut down (if for instance the syntax of the new
> innfeed.conf file is wrong).
Ah, hm, yes, that's true. That would be fine with me, but I could see how
it might be surprising. We should probably only do that for 2.6.
Does anyone have any concerns about this and think we should add a
separate signal for log rotation?
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 47, Issue 1
******************************************