X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Mailer: YahooMailRC/1042.40 YahooMailWebService/0.7.218
Date: Fri, 18 Jul 2008 09:45:38 -0700 (PDT)
From: Mark Charney <mark_charney@yahoo.com>
Subject: Control-c of a bat file does not kill commands run by bat file in some cases
To: cygwin@cygwin.com
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Message-ID: <99652.77639.qm@web51005.mail.re2.yahoo.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

Is this a bug or a feature?

When I run a program loop.exe   whose entire source is "int main() {   while(1);  return 0;}", compiled with MS VS8 or cygwin's gcc, from a bat file whose contents are just "loop.exe" and hit control-c while it is running, sometimes cygwin kills the loop.exe and sometimes it does not. Here are the 6 scenarios that I tried:

1. OKAY tcsh  from a cmd.exe 
2. OKAY bash from a cmd.exe 
3. BROKEN tcsh from an rxvt X window  on local machine
4. BROKEN bash from an rxvt X window on local machine
5. BROKEN tcsh via ssh from a remote machine  (public key auth)
6. BROKEN bash via ssh from a remote machine (public key auth)

OKAY means it kills the bat file and loop.exe
BROKEN means loop.exe continues to run after control-c.

bash/tcsh doesn't not seem to matter, I just did it because I first noticed the problem on tcsh.

At the very least, if it is a feature, it is inconsistent.

My cygwin installation is relatively up to date. This has been a problem for a long time and I'm just getting around to characterizing it. If you want a cygcheck output, or other information please let me know. My cygwin is 1.5.25-15.  If you want a C program instead of a bat file, I think we can do that.


      

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

