SIGINT not passed to java process
Thomas Wolff
towo@towo.net
Thu Feb 28 08:51:00 GMT 2013
Am 11.05.2012 19:29, schrieb Franz Kettwig:
> After updating to the latest cygwin, my Java processes no longer receive SIGINT signals. I have attached a simple Java program that adds a ShutdownHook that will print out when the correct signal is received and the main program sleeps indefinitely waiting for the signal.
>
> I used to be able interrupt the process with Ctrl+C and with kill -2 <pid>. Neither of those methods work for me now.
To help debugging this (for whoever may start an effort, including
myself eventually), some more diagnostics:
Let's clearly distinguish 2 things:
- Interrupt the JVM with Ctrl-C (or kill -2): this works perfectly. It
didn't work though in some snapshots between 1.7.17 and 1.7.18, see
http://cygwin.com/ml/cygwin/2013-01/msg00196.html
- Invoke the JVM interrupt hook: this does not work in mintty but it
does in cygwin console.
However, it can be forced *not* to work in cygwin console either by
redirecting *both* stdin and stdout:
cat | java ... | tee /dev/null
------
Thomas
> Here is the version of Java that I am using:
> java version "1.6.0_31"
> Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
> Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode)
>
> Thanks,
>
> Franz Kettwig
>
>
>
> --
> 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
--
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
More information about the Cygwin
mailing list