public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: saltnlight5 <saltnlight5@gmail.com>
To: cygwin@cygwin.com
Subject: Re: CTRL+C is not working with java on latest cygwin 1.7.15
Date: Thu, 12 Jul 2012 21:57:00 -0000	[thread overview]
Message-ID: <34153502.post@talk.nabble.com> (raw)
In-Reply-To: <34147441.post@talk.nabble.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

      parent reply	other threads:[~2012-07-12 21:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 18:47 saltnlight5
2012-07-11 19:18 ` K Stahl
     [not found]   ` <1355306723156-63181.post@n5.nabble.com>
2012-07-11 19:55   ` saltnlight5
2012-07-11 20:06     ` K Stahl
2012-07-11 20:07     ` saltnlight5
2012-07-11 20:17       ` K Stahl
2012-07-11 20:26         ` saltnlight5
2012-07-11 20:34           ` K Stahl
2012-07-11 20:37             ` K Stahl
2012-07-12  1:40             ` Earnie Boyd
2012-07-12 13:02               ` saltnlight5
2012-07-12 13:23                 ` K Stahl
2012-07-12 15:39                 ` Earnie Boyd
2012-07-12 20:13       ` James Johnston
2012-07-12 21:39         ` saltnlight5
2012-08-02 17:31       ` Roger K. Wells
2012-12-12 10:05         ` erik56d
2012-12-12 14:06           ` Aaron Schneider
2012-12-12 17:26             ` erik56d
2012-07-12 14:24   ` Aaron Schneider
2012-07-12 21:57 ` saltnlight5 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34153502.post@talk.nabble.com \
    --to=saltnlight5@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).