🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #263

Re: Interrupted system calls

#263
From: Jonathan I. Kamens
Date: Tue, 07 Apr 1992 03:09
29 lines
2064 bytes
In article <27851.Apr622.58.1392@virtualnews.nyu.edu> brnstnd@nyu.edu (Dan Bernstein) writes:

   On broken systems, and in stupid cases, yes. On working systems write()
   will always return the number of bytes written, if that number is
   positive. (Yes, this is part of my definition of ``working''; yes, there
   exist systems which work in this respect.)

Code that is attempting to be portable does not rely on functionality
that is known not to exist on some machines (in this case, a large
number of machines).

If you want to write code that will functional properly only on
systems that you consider "workins" ones, then by all means, don't
deal with the possibility of partial, interrupted write()s.

If, on the other hand, you want your code to be as portable as
possible and therefore used by as many people as possible, it should
be able to deal with the possibility of brain-damage in the
environment.  At they very least, put in an undocumented set of
#ifdef's to deal with the possibility, so that when people complain
that something's breaking, you can tell them, "Put this -D in the
Makefile and send a flame to your vendor."

-- 
Jonathan Kamens						jik@MIT.Edu
MIT Information Systems/Athena		    Moderator, news.answers
    (Send correspondence related to the news.answers newsgroup
	{and ONLY correspondence related to the newsgroup}
		 to news-answers-request@MIT.Edu.)
Technical Details
Message-ID: <JIK.92Apr6230946@pit-manager.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik
References: <1992Apr5.224334.24925@cc.uow.edu.au> <JIK.92Apr6104609@pit-manager.mit.edu> <27851.Apr622.58.1392@virtualnews.nyu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik
From: jik@athena.mit.edu (Jonathan I. Kamens)
Newsgroups: comp.unix.programmer
Subject: Re: Interrupted system calls
Message-ID: <JIK.92Apr6230946@pit-manager.mit.edu>
Date: 7 Apr 92 03:09:50 GMT
References: <1992Apr5.224334.24925@cc.uow.edu.au> <JIK.92Apr6104609@pit-manager.mit.edu>
 <27851.Apr622.58.1392@virtualnews.nyu.edu>
Sender: news@athena.mit.edu (News system)
Organization: Massachusetts Institute of Technology
Lines: 29
In-Reply-To: brnstnd@nyu.edu's message of 6 Apr 92 22:58:13 GMT
Nntp-Posting-Host: pit-manager.mit.edu