From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19557 invoked by alias); 12 Jul 2012 21:57:18 -0000 Received: (qmail 19548 invoked by uid 22791); 12 Jul 2012 21:57:17 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,KHOP_THREADED,NML_ADSP_CUSTOM_MED,T_RP_MATCHES_RCVD 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; Thu, 12 Jul 2012 21:57:04 +0000 Received: from telerig.nabble.com ([192.168.236.162]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SpRNg-0007bW-1s for cygwin@cygwin.com; Thu, 12 Jul 2012 14:57:04 -0700 Message-ID: <34153502.post@talk.nabble.com> Date: Thu, 12 Jul 2012 21:57:00 -0000 From: saltnlight5 To: cygwin@cygwin.com Subject: Re: CTRL+C is not working with java on latest cygwin 1.7.15 In-Reply-To: <34147441.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <34147441.post@talk.nabble.com> 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-07/txt/msg00250.txt.bz2 Okay, I finally found out what's going on. I used to have an old cygwin installed (not even sure what version) that only has "C:\Cygwin\Cygwin.bat" to start an terminal. This batch file open a terminal that I can run java.exe, and I used to hit CTRL+C to end it (not only that, it will also invoke the Java's shutdown hook.) After I upgraded to cygwin 1.7.15-1 (it will auto upgrade when we run setup.exe!). The above behavior no longer works! It turns out the new cygwin 1.7.15-1 automatically comes with Mintty terminal now, and will default to create a Shortcut to this on desktop. Well I still have a shortcut to "C:\Cygwin\Cygwin.bat". What I discover is that Java will no longer work with terminal that opens with "C:\Cygwin\Cygwin.bat"! But it DOES work with the Mintty terminal! It's all great for me, because I kind of like Mintty terminal. It's kindda funny because for years I would love to use Mintty, but only to stop because CTRL+C wont' work there. Now we have reverse! However, I have to point out also that although I can hit CTRL+C in mintty to kill a java.exe process, but it DOES NOT invoke the Java's shutdown hook process! Which is shame, because now I can't test my shutdown procedure code. I hope cygwin team can look at this further and provide a good solution, even for the Java folks like myself. I can only cope with Windows because of cygwin exists, so kudo to all the cygwin team and their hard work! Hope also this post will help other Java developers out there. Cheers, Zemian saltnlight5 wrote: > > Hi there, > > Before I upgraded cygwin, I used to be able to press CTRL+C to any java > program, and it will trigger's shutdownhook and exit. But since I upgraded > to latest cygwin, this is no longer working. Has anyone has this problem? > > My cygwin version: > $ uname -a > CYGWIN_NT-5.1 L328BDS002023US 1.7.15(0.260/5/3) 2012-05-09 10:25 i686 > Cygwin > > I did see an old post discussed the same thing, but I did not see a > solution. > http://cygwin.com/ml/cygwin/2012-05/msg00372.html > > Can someone in the list help? > > Thanks > Zemian > ----- ---- Zemian Deng -- View this message in context: http://old.nabble.com/CTRL%2BC-is-not-working-with-java-on-latest-cygwin-1.7.15-tp34147441p34153502.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