🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40616

Re: Diablo debugging problems...

#40616
From: Brad Knowles
Date: Wed, 06 Oct 1999 00:00
27 lines
1913 bytes
In article <7tebo8$hta$1@zeus.fw.cuci.nl>, srb@cuci.nl (Stephen R. van den
Berg) wrote:

> This is what I usually use as a "reliable"-write():
> 
> int rwrite(const int fd,char*a,const unsigned len)
> { int i;size_t left=len;
>   do
>      while(0>(i=write(fd,a,left))&&errno==EINTR);
>   while(i>0&&(a+=i,left-=i));
>   return len-left;
> }

    This is very close to the xwrite() routine that Joe posted, but
neither of these take into account the fact that you should only go
through this loop so many times before you drop out.  If you don't have a
method of giving up when things get hopelessly slow, you can bog down the
whole system waiting on a single write() to complete.

-- 
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-0610991157590001@brad.techos.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> <brad-0510991348210001@brad.techos.skynet.be> <brad-0510991730300001@brad.techos.skynet.be> <37fa44dc$0$7740@news.execpc.com> <7tebo8$hta$1@zeus.fw.cuci.nl>

Show Full Headers
Complete Article Headers
Message-ID: <brad-0610991157590001@brad.techos.skynet.be>
Subject: Re: Diablo debugging problems...
Date: Wed, 06 Oct 1999 00:00:00 +0000
From: brad@shub-internet.org (Brad Knowles)
References: <brad-0110991517500001@brad.techos.skynet.be> <brad-0510991348210001@brad.techos.skynet.be> <brad-0510991730300001@brad.techos.skynet.be> <37fa44dc$0$7740@news.execpc.com> <7tebo8$hta$1@zeus.fw.cuci.nl>
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: 533422058
X-Complaints-To: abuse@skynet.be
X-Trace: news1.skynet.be 939203879 315 195.238.1.121 (6 Oct 1999 09:57:59 GMT)
Organization: Shub-Internet
X-URL: http://www.shub-internet.org/
NNTP-Posting-Date: 6 Oct 1999 09:57:59 GMT
Newsgroups: news.software.nntp