🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40534

Re: Diablo debugging problems...

#40534
From: Brad Knowles
Date: Tue, 05 Oct 1999 00:00
40 lines
2612 bytes
In article <ylg0zqaja4.fsf@windlord.stanford.edu>, Russ Allbery
<rra@stanford.edu> wrote:

> In the code you were quoting, the return value of write() had already been
> checked and I don't believe the syslog() call was reachable if write() had
> returned -1.

    I just had the bright idea that it might be nice if this code was
smart and would loop only a limited number of times before returning, and
if it couldn't write everything it was asked to, the calling routine
should deal with the error.

    Of course, I think these are blocking write() calls, so I would be
very surprised if the routine ever looped more than twice, but still it's
a good idea.  For now, I've set it to break out at 100 times through the
loop, but I'm thinking I should lower that number to something more like
five.


    Blech.  it just occured to me -- I'm doing a blocking write on every
single article, when sending it to the spamfilter.  Double blech.


    Anyway, now I just have to retrofit this xwrite() routine to all the
places that currently call write(), and probably move xwrite() to
something in lib/ (with suitable additions to the appropriate header
files, etc...), so that I can use it everywhere.


    Man, I wish I knew why I wasn't getting anything but
spamfilter-by-body messages anymore....

-- 
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 100?  If so, please contact me via private e-mail for details.

Technical Details
Message-ID: <brad-0510990113060001@dialup1042.brussels2.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-mail
References: <brad-0110991517500001@brad.techos.skynet.be> <37f4e0b3$0$10188@news.execpc.com> <brad-0410991834410001@brad.techos.skynet.be> <yl670ndpwz.fsf@windlord.stanford.edu> <brad-0410992339180001@dialup1042.brussels2.skynet.be> <ylg0zqaja4.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <brad-0510990113060001@dialup1042.brussels2.skynet.be>
Subject: Re: Diablo debugging problems...
Date: Tue, 05 Oct 1999 00:00:00 +0000
From: brad@shub-internet.org (Brad Knowles)
References: <brad-0110991517500001@brad.techos.skynet.be> <37f4e0b3$0$10188@news.execpc.com> <brad-0410991834410001@brad.techos.skynet.be> <yl670ndpwz.fsf@windlord.stanford.edu> <brad-0410992339180001@dialup1042.brussels2.skynet.be> <ylg0zqaja4.fsf@windlord.stanford.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: 532855064
X-Complaints-To: abuse@skynet.be
X-Trace: news0.skynet.be 939078800 3448 194.78.238.210 (4 Oct 1999 23:13:20 GMT)
Organization: Shub-Internet
X-URL: http://www.shub-internet.org/
NNTP-Posting-Date: 4 Oct 1999 23:13:20 GMT
Newsgroups: news.software.nntp