From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: b20 alpha 29 Sep 1998 05:41:18 -0700 Message-ID: <19980929082135.B25527.cygnus.cygwin32.developers@cygnus.com> References: <3610A3BB DOT 77F10FDC AT cityweb DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Corinna Vinschen , cygwin32-developers AT cygnus DOT com I believe that Sergey posted a patch for this a while ago. I don't have the patch around anymore. Maybe he could repost it? On Tue, Sep 29, 1998 at 11:09:15AM +0200, Corinna Vinschen wrote: >I have a funny effect with b20 cygwin.dll. >It only happens in bash, not in tcsh and it >only comes to pass, if CYGWIN32=tty. > >First try: > bash-2.01$ echo x | cat > x > >Second try: > bash-2.01$ echo x > foo > bash-2.01$ echo x | cat > cat: standard output: Bad file number > >This doesn't take place in the following example: > bash-2.01$ cat file > foo > bash-2.01$ cat file | cat > >But here: > bash-2.01$ echo x > foo > bash-2.01$ cat file | cat > cat: standard output: Bad file number > >After the first stdout redirection of a shell builtin, >the pipes doesn't work anymore. I have tried a > STRACE='0xff:0,xxx' >and I have found the following strange lines in the output: > ... > [main] cat 1037 (0) hinfo::de_linearize_fd_array: closed fd 1 > ... > [main] cat 1037 (0) _fstat: -1 = fstat (1, 0x240FF04) > ... -- cgf AT cygnus DOT com http://www.cygnus.com/