This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CTRL+C is not working with java on latest cygwin 1.7.15


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]