Article View: news.software.nntp
Article #42070Question regarding INN's use of the newsgroups file...
From: Brad Knowles
Date: Fri, 10 Dec 1999 00:00
Date: Fri, 10 Dec 1999 00:00
45 lines
2543 bytes
2543 bytes
Folks,
I've done some searches, tried to look in the INN documentation, and
haven't really turned up anything on this.
I know that INN opens the active file and keeps it open, and
constantly makes changes to it as articles come in, etc.... But what
about the newsgroups file? Could it be updated and then safely slid
into place with commands like this:
cd /usr/local/news/db
[ make newsgroups.new file ]
ln newsgroups newsgroups.old
ln -f newsgroups.new newsgroups
rm newsgroups.new
You can do this with processes that re-open the file each time they
need to access it, because the ln is an atomic operation, and when the
process goes to open the file it will definitively either get the old
version (which it can safely hold open for a while, even if the file is
renamed), or it will get the new version -- it won't get a truncated
file, nor will it get some mish-mash of the two.
Or would I need to update the file and then do something like a
"ctlinnd reload newsgroups"?
I ask because I'm helping to work on a project that will create a
new way to maintain and synchronize active files, and which should be
adaptable to all of the major news servers. For the moment, we're
working on INN, but once we've got the process working correctly, I'll
adapt it to Diablo and there are others who will adapt it to bCandid,
etc....
Thanks!
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a USENET news server administrator outside of North America or
Western Europe? Would you like a newsfeed from a site in the Freenix
Top 65? If so, please contact me via private e-mail for details.
Technical Details
Message-ID:
<brad-80D295.16155910121999@news.skynet.be>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <brad-80D295.16155910121999@news.skynet.be> Subject: Question regarding INN's use of the newsgroups file... Date: Fri, 10 Dec 1999 00:00:00 +0000 From: Brad Knowles <brad@shub-internet.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 559020376 Mail-Copies-To: poster X-Complaints-To: abuse@skynet.be X-Trace: news0.skynet.be 944838981 7878 195.238.1.121 (10 Dec 1999 15:16:21 GMT) Organization: Shub-Internet X-URL: http://www.shub-internet.org/ User-Agent: MT-NewsWatcher/3.0 (PPC) NNTP-Posting-Date: 10 Dec 1999 15:16:21 GMT Newsgroups: news.software.nntp