delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/02/10:16:25

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3CFA1A6E.D13C3BB4@phekda.freeserve.co.uk>
Date: Sun, 02 Jun 2002 14:15:26 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: open(), fopen() don't check for llseek() failure
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020602155924 DOT 14325B AT is>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
> 
> On Sun, 2 Jun 2002, Richard Dawe wrote:
> 
> > When open and fopen are called to open & append to a file, they don't
> > check that llseek() is successful. I think they should fail, if the seek
> > was unsuccessful. Should this be fixed?
> 
> 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.

> 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.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019