X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <48812F97.FFCDAA4F@dessent.net>
Date: Fri, 18 Jul 2008 17:04:39 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Control-c of a bat file does not kill commands run by bat file  in   some cases
References: <99652.77639.qm@web51005.mail.re2.yahoo.com> <alpine.LFD.1.10.0807182043030.14074@trueman.cs.cse.dmu.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hugh Sasse wrote:

> to see what these things are.  I think stty -a should suffice
> to tell you what "intr" is.  Or, in other words, you may have
> to hit something other than <ctrl-C> to kill things, unless you
> reset it with stty.

That logic is faulty because stty is a Cygwin program.  When connected
to a pty it will therefore correctly know how to interpret and output
the settings of the slave end of the pty.  And Cygwin programs when run
in a pty will correctly respond to SIGINT.  The problem is that you're
not talking about a Cygwin program, you're talking about a native win32
program which has no concept of what a pty is and just thinks its
running as a detached process with no console and a pipe for stdin.  Or
in other words, it's irrelevant what stty reports that "intr" is set to,
correct or not, because that only applies to pty-aware apps.

Brian

--
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/

