delorie.com/archives/browse.cgi | search |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |