Article View: news.software.nntp
Article #4557Re: nnrpd v. history
From: J. Porter Clark
Date: Fri, 02 Feb 1996 00:00
Date: Fri, 02 Feb 1996 00:00
38 lines
2242 bytes
2242 bytes
jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) writes:
>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.
How about this:
for each command
note the time
if current time is more than 10 minutes since last command
if history is open
close history
At worst, you will have two history files around for almost
CLIENT_TIMEOUT + 10 minutes (typically 2 hours 10 minutes). But it
involves no signal handling and should be portable. (I picked 10
minutes out of the air.)
>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.
Of course, this doesn't handle these situations.
--
J. Porter Clark jpc@hammer.msfc.nasa.gov
NASA/MSFC Flight Data Systems Branch
Technical Details
Message-ID:
<4ern13$2v6@hammer.msfc.nasa.gov>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> <4eoeeq$c99@olivea.ATC.Olivetti.Com>Show Full Headers
Complete Article Headers
Message-ID: <4ern13$2v6@hammer.msfc.nasa.gov> Subject: Re: nnrpd v. history Date: Fri, 02 Feb 1996 00:00:00 +0000 From: jpc@hammer.msfc.nasa.gov (J. Porter Clark) References: <3105AC38.167E@garply.com> <4eh9gg$2bdr@sheraton.asianconnect.com> <310D5478.1CFB@garply.com> <4elgf5$60@dodgson.math.psu.edu> <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-mail X-Deja-AN: 137606681 Organization: NASA/MSFC Newsgroups: news.software.nntp