X-Recipient: archive-cygwin AT delorie DOT com 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 Date: Wed, 12 Dec 2012 09:26:05 -0800 (PST) From: erik56d To: cygwin AT cygwin DOT com Message-ID: <1355333165623-94878.post@n5.nabble.com> In-Reply-To: References: <1355306723154-63179 DOT post AT n5 DOT nabble DOT com> <1355306723156-63181 DOT post AT n5 DOT nabble DOT com> <1355306723157-63182 DOT post AT n5 DOT nabble DOT com> <501AB915 DOT 5050106 AT saic DOT com> <1355306723094-94866 DOT post AT n5 DOT nabble DOT 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 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