delorie.com/archives/browse.cgi | search |
Date: | Sun, 02 Jun 2002 19:46:53 +0300 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> |
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: | <Pine DOT SUN DOT 3 DOT 91 DOT 1020602155924 DOT 14325B AT is> <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 |
> Date: Sun, 02 Jun 2002 14:15:26 +0100 > From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> > > > > 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.''
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |