From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26075 invoked by alias); 12 Dec 2012 17:26:16 -0000 Received: (qmail 26046 invoked by uid 22791); 12 Dec 2012 17:26:11 -0000 X-SWARE-Spam-Status: No, hits=1.3 required=5.0 tests=AWL,BAYES_20,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,KHOP_THREADED,NML_ADSP_CUSTOM_MED,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Dec 2012 17:26:06 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Tiq4L-0002Wf-KL for cygwin@cygwin.com; Wed, 12 Dec 2012 09:26:05 -0800 Date: Wed, 12 Dec 2012 17:26:00 -0000 From: erik56d To: cygwin@cygwin.com Message-ID: <1355333165623-94878.post@n5.nabble.com> In-Reply-To: References: <1355306723154-63179.post@n5.nabble.com> <1355306723156-63181.post@n5.nabble.com> <1355306723157-63182.post@n5.nabble.com> <501AB915.5050106@saic.com> <1355306723094-94866.post@n5.nabble.com> Subject: Re: CTRL+C is not working with java on latest cygwin 1.7.15 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-12/txt/msg00182.txt.bz2 There is nothing special about the Java program. Might be e.g. public class ShutdownHookTester { public static void main(String[] args) { Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { System.out.println("Cleaning up"); } }); for (int i=0;i<10000;i++) { System.out.print("."); try { Thread.sleep(1000); } catch (InterruptedException e) { } } } } When run under CygWin, pressing CTRL-C will just give you your shell prompt: $java -cp target/other-utils-1.0.jar com.edb.bds.util.ShutdownHookTester ... $ Run from cmd.exe, however, the Shutdown Hook is executed as it should be, yielding: C:\java -cp . com.edb.bds.util.ShutdownHookTester ....Cleaning up C:\ -- View this message in context: http://cygwin.1069669.n5.nabble.com/CTRL-C-is-not-working-with-java-on-latest-cygwin-1-7-15-tp63179p94878.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple