delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/01/18:08:08

X-Spam-Check-By: sourceware.org
From: "Gary R. Van Sickle" <g DOT r DOT vansickle AT worldnet DOT att DOT net>
To: <cygwin AT cygwin DOT com>
Subject: RE: cygwin fork()
Date: Fri, 1 Sep 2006 17:07:49 -0500
Message-ID: <002c01c6ce13$1094de50$020aa8c0@DFW5RB41>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <20060901180041.GA11672@trixie.casa.cgf.cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> From: Christopher Faylor
> Sent: Friday, September 01, 2006 1:01 PM
> Subject: Re: cygwin fork()
> 
> On Fri, Sep 01, 2006 at 06:57:10PM +0100, Dave Korn wrote:
> >On 01 September 2006 18:47, clayne wrote:
> >>I found the real culprit, which I had also ifdef'd out because it 
> >>looked bogus and crufty:
> >>
> >>/* Return 1 if a seek on FD will succeed. */ #ifndef __CYGWIN__ #  
> >>define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0) 
> #else #  
> >>define fd_is_seekable(fd) 0 #endif /* __CYGWIN__ */
> >
> >Yeeesh.  This is a terrible way of dealing with the fact 
> that you can't 
> >seek a stream accurately if you open it in text mode, because of the 
> >ambiguity about whether you've advanced one or two chars through the 
> >underlying file when you see an LF that could perhaps have actually 
> >been a CR/LF.  What we really want is
> 
> AFAIK, Cygwin's lseek should handle seeking on text streams.  
> DJ implemented that years ago.
> 

Last I looked, which was admittedly also years ago, it was "#if 0"'ed out,
with a comment to the effect of "Nobody has any business seeking around in
text files."

-- 
Gary R. Van Sickle
 


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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