Article View: news.software.nntp
Article #4472Re: nnrpd v. history
From: Jerry Aguirre
Date: Wed, 31 Jan 1996 00:00
Date: Wed, 31 Jan 1996 00:00
38 lines
2484 bytes
2484 bytes
In article <4elgf5$60@dodgson.math.psu.edu> barr@math.psu.edu (Dave Barr) writes: Regarding nnrpds keeping the old history file in use, newslib running out of disk space, and my script to truncate the history.bak file before removing it. >Except for the small fact that it's solving a completely different problem. > > >A reasonable fix is to add some code to nnrpd: > if (I have history file open) > check periodically if (the inode has changed) > close history Dave, why don't you think that my method solves the problem? If you "cp /dev/null history.bak" that will, on most Unix versions, truncate the file to zero length and free all the disk blocks associated with it. Even if some other process has the file open you get the disk blocks back. The inode may stay busy but I could run a month of those and not have problems. Yes, it would be nice if nnrpd had more smarts to notice when the history file changed. That would solve 99% of the typical cases. But this is not so simple to code? The typical case has an nnrpd hung waiting on its incomming connection. It is not executing so it is a little difficult for it to decide to do anything about the history file. Yes you can have it wake up via an alarm and notice that it needs to do something but it is very risky to do more than set a flag in such a routine. So it goes back to sleep waiting on the read and even though the "close-history" flag is set it won't do anything about it. And this ignores the possibility that it is not nnrpd. Suppose the other day you were doing "more history" and control-Zed it or left it running somewhere. Also nntplink has a mode where it can use the history file to look up message IDs. Or someone running a local news reader, not using NNTP, could also have the history file open.
Technical Details
Message-ID:
<4eoeeq$c99@olivea.ATC.Olivetti.Com>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-mailReferences:
<3105AC38.167E@garply.com> <4eh9gg$2bdr@sheraton.asianconnect.com> <310D5478.1CFB@garply.com> <4elgf5$60@dodgson.math.psu.edu>Show Full Headers
Complete Article Headers
Message-ID: <4eoeeq$c99@olivea.ATC.Olivetti.Com> Subject: Re: nnrpd v. history Date: Wed, 31 Jan 1996 00:00:00 +0000 From: jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) References: <3105AC38.167E@garply.com> <4eh9gg$2bdr@sheraton.asianconnect.com> <310D5478.1CFB@garply.com> <4elgf5$60@dodgson.math.psu.edu> 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: 137373356 Organization: Olivetti ATC; Cupertino, CA; USA Newsgroups: news.software.nntp