From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 14347 invoked from network); 20 Aug 1998 00:12:26 -0000 Received: from caffeine.ix.net.nz (203.97.100.28) by mail2.redhat.com with SMTP; 20 Aug 1998 00:12:26 -0000 Received: (from chris@localhost) by caffeine.ix.net.nz (8.8.7/8.8.3) id MAA00437; Thu, 20 Aug 1998 12:12:06 +1200 Message-ID: <19980820121206.A418@caffeine.ix.net.nz> Date: Thu, 20 Aug 1998 12:12:06 +1200 From: Chris Wedgwood To: Quant-X Alpha Linux Support , axp-list@redhat.com Cc: redhat-devel-list@redhat.com Subject: Re: fclose() - still broken? References: <35D95C14.8EAE66D6@voicenet.com> <19980819140059.A32620@caffeine.ix.net.nz> <199808190250.EAA04909@stefan.sime.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <199808190250.EAA04909@stefan.sime.com>; from Quant-X Alpha Linux Support on Wed, Aug 19, 1998 at 04:50:08AM +0200 X-No-Archive: Yes On Wed, Aug 19, 1998 at 04:50:08AM +0200, Quant-X Alpha Linux Support wrote: > rc = read(0, NULL, 10); > > returns 6 here (Linux 2.1.113 i586) (no errno, no core) > when entering "hello" > > Is this valid, or not ? ;-0 If you have a writable page at 0x0, then yes. A stickier question is what happens you you try to read a 10 byte file using read(fd,&buffer,8192) when the buffer is only 4k is size. 2.0.x will return EFAULT because it knows the entire range is not valid (the high 4k is bad), but 2.1.x will succeed because it can read 10 bytes without failing. Which is correct? (Btw, different OSs take one or other approach). -cw