Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <1DB8BA4BAC88D3118B2300508B5A552C0C8CD7@mail.fitlinxx.com> From: David Bolen To: "'cygwin AT sourceware DOT cygnus DOT com'" Subject: How is textmode/binmode determined in Cygwin 1.1.0 net release fo r pipes? Date: Thu, 27 Apr 2000 21:49:45 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" I just recently updated to the recent net release of 1.1.0, and immediately started running into some problems with my existing use of rsync, which generally disappeared if I reverted to the b20.1 version of cygwin1.dll I had previously been using. I believe I tracked down the underlying cause, and have a possible workaround, but I was wondering if anyone could validate what I'm seeing and/or suggest a better solution. The root problem appears to be that data being generated by rsync is somewhere along the line getting interpreted as if it was access to a "textmode" filesystem (LF -> CRLF). I'm using rsync with pipes, so rsync is doing read()/write() to descriptors obtained via the pipe() call. I don't seem to have the same problem with socket I/O, so it appears to be something specific to the file descriptors returned from pipe(). My current filesystem mount points are in textmode (I changed the default established by setup) since I'm stuck dealing with lots of files that still need handling with native NT stuff. The tools I use either use O_BINARY (as rsync does for actual file access) or I can temporarily mount something binmode, so this hasn't been an issue. I've found that adding CYGWIN=BINMODE to my enviornment seems to resolve the issue - my mount points still explicitly set textmode for file access, and it looks like the environment variable changed the default pipe handling. Can anyone validate that the 1.1.0 release does in fact apply a textmode/binmode decision to pipe file descriptors? Are there any other alternatives to setting CYGWIN to override this behavior? Thanks for any information. -- David /-----------------------------------------------------------------------\ \ David Bolen \ E-mail: db3l AT fitlinxx DOT com / | FitLinxx, Inc. \ Phone: (203) 708-5192 | / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \ \-----------------------------------------------------------------------/ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com