Date: Sun, 02 Jun 2002 19:46:53 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Richard Dawe Message-Id: <7826-Sun02Jun2002194653+0300-eliz@is.elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <3CFA1A6E.D13C3BB4@phekda.freeserve.co.uk> (message from Richard Dawe on Sun, 02 Jun 2002 14:15:26 +0100) Subject: Re: open(), fopen() don't check for llseek() failure References: <3CFA1A6E DOT D13C3BB4 AT phekda DOT freeserve DOT co DOT uk> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sun, 02 Jun 2002 14:15:26 +0100 > From: Richard Dawe > > > > When do we expect llseek to fail? > > I don't expect it to fail. But if it did, we'd ignore it. I think it's better > not to ignore it. My worry is that doing so will break some cases where we currently silently succeed. > > What happens with devices open in append mode? > > I don't know. > > Presumably you're thinking of devices where you only ever conceptually append > data - COM1:, CON:, etc. - where a seek is meaningless. I guess in those cases > we should make lseek, llseek return ESPIPE and then ignore that errno in open, > fopen. I was thinking about CON, mainly. It doesn't make sense to fail fopen in that case, even if DOS returns an error. We might shoot ourselves in the foot. So my recommendation is not to make this change unless we have some real example where the current behavior causes trouble. ``If it ain't broken, don't fix it.''