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 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 Subject: Re: open(), fopen() don't check for llseek() failure References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/ ]