This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash misbehavior


On Mon, Sep 27, 2004 at 09:33:08PM -0400, Pierre A. Humblet wrote:
>The following command produces an unexpected
>result with standard Cygwin and bash  
>
>~: echo 1 | `echo cat` &
>[1] 180019
>~: 1
>Use "logout" to leave the shell.
>[1]+  Done                    echo 1 | `echo cat`
>
>If ignoreeof is off, bash goes away.
>
>It looks like fhandler_termios::bg_check returns an error, 
>not sure what's going on. I have a trace available.

Are you sure that bash is doing the right thing?  Strace implies that it
is setting the process group of the terminal to a nonexistent pid.  It
is a bug in cygwin that this is allowed but it seems like a bug in bash
that it is doing this at all.

Fixing the bug in cygwin seems to cause bash to behave better but it
still seems strange.  This seems like YA instance of bash assuming that
it can rely on the fact that a recently exited pid will be invalid.

Anyway, thanks for the bug report with simple test case.  The fix is
in CVS.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]