delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/02/22:37:46

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Fri, 2 Jun 2000 21:45:30 -0400
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: text / binary mounts (sorry)
Message-ID: <20000602214530.A3577@cygnus.com>
Reply-To: cygwin AT sourceware DOT cygnus DOT com
Mail-Followup-To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
References: <1DB8BA4BAC88D3118B2300508B5A552CD92550 AT mail DOT fitlinxx DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <1DB8BA4BAC88D3118B2300508B5A552CD92550@mail.fitlinxx.com>; from db3l@fitlinxx.com on Fri, Jun 02, 2000 at 05:35:29PM -0400

On Fri, Jun 02, 2000 at 05:35:29PM -0400, David Bolen wrote:
>Earnie Boyd [earnie_boyd AT yahoo DOT com] writes:
>>Are you sure of this, Ron?  AFAIK CYGWIN=binmode only affects the pipes
>>and redirection and not file I/O.  BTW CYGWIN=binmode is the default.
>
>One minor caveat with respect to "default" - the default behavior for
>the stdin/stdout handles changed from b20.1 to the net releases,
>dependent on whether you explicitly had the environment variable or
>not.  If you put CYGWIN=binmode in your environment it also affects
>stdin/stdout default behavior, but if you leave the variable out they
>will default to text mode and not binary.

It only affects stdin/stdout behavior when the program is run from the
Windows command shell.

>It's my understanding this was done for some issues with interactive
>tool use, but unfortunately it also comes into play when utilities
>fork() a copy of themselves to process data on stdin/stdout (I ran into
>this with the rsync utility).

I'm not sure how this could be.  Reading the code, I see this line right
before the part that sets the stdin/stdout based on CYGWIN=binmode.

  if (!parent_alive && NOTSTATE(myself, PID_CYGPARENT))

fork() is a cygwin function which produces an additional copy of a running
program.  That means that the child has a a cygwin parent and so stdin should
be in the same state in the child as in the parent.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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