X-Recipient: archive-cygwin AT delorie DOT com 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 Message-ID: <34153502.post@talk.nabble.com> Date: Thu, 12 Jul 2012 14:57:04 -0700 (PDT) From: saltnlight5 To: cygwin AT cygwin DOT 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 DOT post AT talk DOT nabble DOT com> 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 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