From 57a64c15da30be80bb7c9cec0f040fa720cd60f4 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 6 Mar 2005 02:46:54 +0000 Subject: * pathnames.sgml: Clarify binmode/textmode behavior slightly. * textbinary.sgml: Ditto. --- winsup/doc/textbinary.sgml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'winsup/doc/textbinary.sgml') diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml index 24b2a4c96..15994185a 100644 --- a/winsup/doc/textbinary.sgml +++ b/winsup/doc/textbinary.sgml @@ -35,15 +35,15 @@ are to be opened when the mode is not specified explicitly. The rules are evolving, this section gives the design goals. -If the file appears to reside on a file system that is mounted -(i.e. if its pathname starts with a directory displayed by -mount), then the default is specified by the mount -flag. If the file is a symbolic link, the mode of the target file system -applies. +If the filename is specified as a POSIX path and it appears to +reside on a file system that is mounted (i.e. if its pathname starts +with a directory displayed by mount), then the +default is specified by the mount flag. If the file is a symbolic link, +the mode of the target file system applies. -If the file appears to reside on a file system that is not mounted -(as can happen when the path contains a drive letter), the default is binary. +If the file is specified via a MS-DOS pathname (i.e., it contains a +backslash or a colon), the default is binary. @@ -55,9 +55,11 @@ in binary mode if any of the following conditions hold: binary mode is specified in the open call -CYGWIN contains binmode +the filename is a MS-DOS filename + +the file resides on a binary mounted partition -the file resides in a binary mounted partition +CYGWIN contains binmode the file is not a disk file @@ -66,11 +68,7 @@ in binary mode if any of the following conditions hold: -When a Cygwin program is launched by a shell, its standard input, -output and error are in binary mode if the CYGWIN variable -contains tty, else in text mode, except if they are piped -or redirected. - When redirecting, the Cygwin shells uses rules (a-c). For + When redirecting, the Cygwin shells uses rules (a-e). For these shells the relevant value of CYGWIN is that at the time the shell was launched and not that at the time the program is executed. Non-Cygwin shells always pipe and redirect with binary mode. With -- cgit v1.2.3