delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/02/28/03:52:01

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <512F1A94.5000403@towo.net>
Date: Thu, 28 Feb 2013 09:51:32 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130215 Thunderbird/17.0.3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: SIGINT not passed to java process
References: <A1B8331495C6F348B95DC9E930C25EDC5FD01A48D3 AT hiwan DOT concordenergy DOT com>
In-Reply-To: <A1B8331495C6F348B95DC9E930C25EDC5FD01A48D3@hiwan.concordenergy.com>
X-TagToolbar-Keys: D20130228095132693
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019