Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 28 Sep 2004 00:46:25 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: bash misbehavior Message-ID: <20040928044625.GA25363@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3 DOT 0 DOT 5 DOT 32 DOT 20040927213308 DOT 0081f1b0 AT verizon DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.5.32.20040927213308.0081f1b0@verizon.net> User-Agent: Mutt/1.4.1i 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/