delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/22/12:44:32

Date: Wed, 22 Aug 2001 19:14:45 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: sandmann AT clio DOT rice DOT edu
Message-Id: <9791-Wed22Aug2001191445+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <10108221426.AA18838@clio.rice.edu> (sandmann@clio.rice.edu)
Subject: Re: Fseek on STDIN problem on Win 2K
References: <10108221426 DOT AA18838 AT clio DOT rice DOT edu>
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

> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Wed, 22 Aug 2001 09:26:18 -0500 (CDT)
> 
> > Does this mean we need to `lseek (fd, SEEK_SET, 0L)' inside _read, to
> > avoid breaking following seeks?  Do we need to do that only for handle
> > 0, or for any handle?  What about seeks after a write? do they have
> > the same problems (with redirected stdout or elsewhere)?
> 
> I don't know the answer to any of these questions - we'll have to
> write a lot of test programs.

I think we should.  lseek is too important.

> Here's a thought - I've used lseek/read/write on NT with DJGPP 
> somewhat frequently in the last several years without seeing this
> problem.  Let's assume for a second this is only seen on handles
> opened by NT for us, that have the weird "0" behavior.  If we 
> declared these as pipes (completely valid for NT, and a case we
> probably need to handle anyway) then no one seeks on STDIN and the
> problem goes away.

I'm not sure what exactly do you mean by ``declare these as pipes''.
Does this mean some changes in the library, or just documentation?

- Raw text -


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