public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* SIGINT not passed to java process
@ 2012-05-11 17:30 Franz Kettwig
  2012-05-17 15:31 ` Olivier Lefevre
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Franz Kettwig @ 2012-05-11 17:30 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

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.

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


[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 16335 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Fri May 11 18:25:42 2012

Windows XP Professional Ver 5.1 Build 2600 Service Pack 3

Path:	C:\tools\usr\local\bin
	C:\tools\bin
	C:\Program Files\Java\jdk1.6.0_31\bin
	C:\WINDOWS\system32
	C:\WINDOWS
	C:\WINDOWS\System32\Wbem
	C:\WINDOWS\system32\WindowsPowerShell\v1.0
	C:\Program Files\QuickTime\QTSystem
	C:\Program Files\TortoiseSVN\bin

Output from C:\tools\bin\id.exe
UID: 13149(fkettwig)     GID: 10513(Domain Users)
10513(Domain Users)      0(root)                  544(Administrators)
545(Users)               1005(Debugger Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

HOME = 'C:\'
PWD = '/cygdrive/c/Concord.working/Trader'
USER = 'fkettwig'

ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
APPDATA = 'C:\Documents and Settings\fkettwig\Application Data'
CLASSPATH = 'bin;lib/\*'
CLIENTNAME = 'Console'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
COMPUTERNAME = 'CEKETTWIG'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
FP_NO_HOST_CHECK = 'NO'
HISTCONTROL = 'ignoredups'
HISTFILESIZE = '2000'
HISTIGNORE = '[ 	]*:&:[fb]g:exit:ls:ll:la:history'
HISTSIZE = '2000'
HOMEDRIVE = 'C:'
HOMEPATH = '\Documents and Settings\fkettwig'
HOSTNAME = 'cekettwig'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
LANG = 'en_US.UTF-8'
LOGONSERVER = '\\ARROWHEAD'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man:'
NUMBER_OF_PROCESSORS = '4'
OLDPWD = '/cygdrive/c'
OS = 'Windows_NT'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1;.PSC1'
PRINTER = '\\HOMESTEAD\HP LaserJet 4100 PCL 6'
PROCESSOR_ARCHITECTURE = 'x86'
PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 37 Stepping 2, GenuineIntel'
PROCESSOR_LEVEL = '6'
PROCESSOR_REVISION = '2502'
PROGRAMFILES = 'C:\Program Files'
PROMPT_COMMAND = 'history -a'
PS1 = '[\w]$ '
PSModulePath = 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\'
QTJAVA = 'C:\Program Files\Java\jre6\lib\ext\QTJava.zip'
SESSIONNAME = 'Console'
SHELL = '/bin/bash'
SHLVL = '1'
SYSTEMDRIVE = 'C:'
SYSTEMROOT = 'C:\WINDOWS'
TERM = 'xterm'
TZ = 'America/Denver'
USERDNSDOMAIN = 'CONCORDENERGY.COM'
USERDOMAIN = 'CONCORDENERGY'
USERNAME = 'fkettwig'
USERPROFILE = 'C:\Documents and Settings\fkettwig'
VSTO_LOGALERTS = '1'
WINDIR = 'C:\WINDOWS'
_ = '/usr/bin/cygcheck'
asl.log = 'Destination=file'
temp = 'C:\DOCUME~1\fkettwig\LOCALS~1\Temp'
tmp = 'C:\DOCUME~1\fkettwig\LOCALS~1\Temp'

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
  (default) = '\??\C:\tools'
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\Cygwin
  (default) = (unsupported type)
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\tools'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\tools'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: d3ad22af816a24a1 Path: C:\tools
  User:   Key: d3ad22af816a24a1 Path: C:\tools

c:  hd  NTFS    953859Mb  12% CP CS UN PA FC     
d:  cd             N/A    N/A                    
e:  fd             N/A    N/A                    
f:  fd             N/A    N/A                    
g:  fd             N/A    N/A                    
h:  fd             N/A    N/A                    
s:  net NTFS   16777087Mb   5% CP CS UN PA FC     Drobo Fileserver
t:  net NTFS   16777087Mb   5% CP CS UN PA FC     Drobo Fileserver
u:  net NTFS   16777087Mb   5% CP CS UN PA FC     Drobo Fileserver

C:\tools         /          system  binary,auto
C:\tools\bin     /usr/bin   system  binary,auto
C:\tools\lib     /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,auto

Found: C:\tools\bin\awk
 -> C:\tools\bin\gawk.exe
Found: C:\tools\bin\bash.exe
Found: C:\tools\bin\cat.exe
Found: C:\tools\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\tools\bin\find.exe
Found: C:\WINDOWS\system32\find.exe
Warning: C:\tools\bin\find.exe hides C:\WINDOWS\system32\find.exe
Not Found: gcc
Not Found: gdb
Found: C:\tools\bin\grep.exe
Found: C:\tools\bin\kill.exe
Not Found: ld
Found: C:\tools\bin\ls.exe
Not Found: make
Found: C:\tools\bin\mv.exe
Not Found: patch
Found: C:\tools\bin\perl.exe
Found: C:\tools\bin\rm.exe
Found: C:\tools\bin\sed.exe
Found: C:\tools\bin\ssh.exe
Found: C:\tools\bin\sh.exe
Found: C:\tools\bin\tar.exe
Found: C:\tools\bin\test.exe
Found: C:\tools\bin\vi
 -> C:\tools\bin\vim-nox.exe
Found: C:\tools\bin\vim
 -> C:\tools\etc\alternatives\vim
 -> C:\tools\bin\vim-nox.exe

  448k 2012/03/23 C:\tools\bin\cygasn1-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygasn1-8.dll" v0.0 ts=2012/3/23 3:53
   14k 2012/05/04 C:\tools\bin\cygattr-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygattr-1.dll" v0.0 ts=2012/5/4 12:35
   62k 2011/05/21 C:\tools\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz2-1.dll" v0.0 ts=2011/5/21 20:16
    9k 2011/01/07 C:\tools\bin\cygcom_err-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygcom_err-2.dll" v0.0 ts=2011/1/7 1:26
    7k 2012/05/07 C:\tools\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypt-0.dll" v0.0 ts=2012/5/7 12:18
 1515k 2012/05/11 C:\tools\bin\cygcrypto-1.0.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-1.0.0.dll" v0.0 ts=2012/5/11 11:33
  929k 2011/11/10 C:\tools\bin\cygdb-4.5.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb-4.5.dll" v0.0 ts=2011/11/10 19:52
   93k 2011/11/10 C:\tools\bin\cygdb_cxx-4.5.dll - os=4.0 img=1.0 sys=4.0
                  "cygdb_cxx-4.5.dll" v0.0 ts=2011/11/10 19:53
  140k 2012/05/03 C:\tools\bin\cygedit-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygedit-0.dll" v0.0 ts=2012/5/3 18:12
   43k 2010/01/02 C:\tools\bin\cygform-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygform-10.dll" v0.0 ts=2010/1/2 14:49
   47k 2010/01/02 C:\tools\bin\cygformw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygformw-10.dll" v0.0 ts=2010/1/2 17:31
   79k 2011/10/26 C:\tools\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0
                  "cyggcc_s-1.dll" v0.0 ts=2011/10/23 14:15
   19k 2009/02/26 C:\tools\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-4.dll" v0.0 ts=2009/2/26 7:58
    8k 2009/02/26 C:\tools\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-4.dll" v0.0 ts=2009/2/26 7:58
  317k 2011/07/31 C:\tools\bin\cyggmp-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggmp-3.dll" v0.0 ts=2011/7/31 6:14
  179k 2012/03/23 C:\tools\bin\cyggssapi-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggssapi-3.dll" v0.0 ts=2012/3/23 4:01
   10k 2012/03/23 C:\tools\bin\cygheimbase-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygheimbase-1.dll" v0.0 ts=2012/3/23 3:51
   20k 2012/03/23 C:\tools\bin\cygheimntlm-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygheimntlm-0.dll" v0.0 ts=2012/3/23 3:58
   25k 2012/05/04 C:\tools\bin\cyghistory7.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory7.dll" v0.0 ts=2012/5/4 22:07
  211k 2012/03/23 C:\tools\bin\cyghx509-5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghx509-5.dll" v0.0 ts=2012/3/23 3:54
  358k 2012/04/14 C:\tools\bin\cygicons-0.dll - os=4.0 img=1.4 sys=4.0
                  "cygicons-0.dll" v0.0 ts=2012/4/14 2:48
  985k 2011/10/16 C:\tools\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygiconv-2.dll" v0.0 ts=2011/10/16 18:01
   35k 2011/10/16 C:\tools\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-8.dll" v0.0 ts=2011/10/16 6:38
   20k 2012/03/23 C:\tools\bin\cygkafs-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygkafs-0.dll" v0.0 ts=2012/3/23 3:58
  372k 2012/03/23 C:\tools\bin\cygkrb5-26.dll - os=4.0 img=1.0 sys=4.0
                  "cygkrb5-26.dll" v0.0 ts=2012/3/23 3:57
    5k 2012/05/09 C:\tools\bin\cyglsa.dll - os=4.0 img=1.0 sys=4.0
                  "cyglsa.dll" v0.0 ts=2012/5/9 9:26
    9k 2012/05/09 C:\tools\bin\cyglsa64.dll - os=5.2 img=0.0 sys=5.2
  123k 2011/05/19 C:\tools\bin\cyglzma-5.dll - os=4.0 img=1.0 sys=4.0
                  "cyglzma-5.dll" v0.0 ts=2011/5/19 3:41
   94k 2012/04/22 C:\tools\bin\cygmagic-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygmagic-1.dll" v0.0 ts=2012/4/22 19:09
   25k 2010/01/02 C:\tools\bin\cygmenu-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu-10.dll" v0.0 ts=2010/1/2 14:48
   25k 2010/01/02 C:\tools\bin\cygmenuw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenuw-10.dll" v0.0 ts=2010/1/2 17:30
  213k 2011/07/31 C:\tools\bin\cygmp-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygmp-3.dll" v0.0 ts=2011/7/31 6:12
   63k 2010/01/02 C:\tools\bin\cygncurses++-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++-10.dll" v0.0 ts=2010/1/2 15:00
   63k 2010/01/02 C:\tools\bin\cygncurses++w-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++w-10.dll" v0.0 ts=2010/1/2 17:41
  195k 2010/01/02 C:\tools\bin\cygncurses-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses-10.dll" v0.0 ts=2010/1/2 14:45
  244k 2010/01/02 C:\tools\bin\cygncursesw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygncursesw-10.dll" v0.0 ts=2010/1/2 17:28
   13k 2010/01/02 C:\tools\bin\cygpanel-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel-10.dll" v0.0 ts=2010/1/2 14:47
   13k 2010/01/02 C:\tools\bin\cygpanelw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanelw-10.dll" v0.0 ts=2010/1/2 16:30
  255k 2012/02/10 C:\tools\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre-0.dll" v0.0 ts=2012/2/10 10:24
 1627k 2010/08/29 C:\tools\bin\cygperl5_10.dll - os=4.0 img=1.0 sys=4.0
                  "cygperl5_10.dll" v0.0 ts=2010/8/28 19:17
   22k 2002/06/09 C:\tools\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpopt-0.dll" v0.0 ts=2002/6/9 6:45
  162k 2012/05/04 C:\tools\bin\cygreadline7.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline7.dll" v0.0 ts=2012/5/4 22:07
   51k 2012/03/23 C:\tools\bin\cygroken-18.dll - os=4.0 img=1.0 sys=4.0
                  "cygroken-18.dll" v0.0 ts=2012/3/23 3:51
    8k 2011/05/05 C:\tools\bin\cygsigsegv-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygsigsegv-2.dll" v0.0 ts=2011/5/5 8:33
 1613k 2010/12/01 C:\tools\bin\cygsqlite3-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygsqlite3-0.dll" v0.0 ts=2010/12/1 12:20
  359k 2012/05/11 C:\tools\bin\cygssl-1.0.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-1.0.0.dll" v0.0 ts=2012/5/11 11:33
    8k 2011/10/26 C:\tools\bin\cygssp-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygssp-0.dll" v0.0 ts=2011/10/23 14:33
  780k 2011/10/26 C:\tools\bin\cygstdc++-6.dll - os=4.0 img=1.0 sys=4.0
                  "cygstdc++-6.dll" v0.0 ts=2011/10/23 14:58
   48k 2010/01/02 C:\tools\bin\cygtic-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygtic-10.dll" v0.0 ts=2010/1/2 14:45
   48k 2010/01/02 C:\tools\bin\cygticw-10.dll - os=4.0 img=1.0 sys=4.0
                  "cygticw-10.dll" v0.0 ts=2010/1/2 17:28
  157k 2012/03/23 C:\tools\bin\cygwind-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygwind-0.dll" v0.0 ts=2012/3/23 3:52
   28k 2010/03/28 C:\tools\bin\cygwrap-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygwrap-0.dll" v0.0 ts=2010/3/28 10:02
   76k 2010/08/01 C:\tools\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2010/8/1 22:04
 2235k 2012/05/09 C:\tools\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2012/5/9 9:25
    Cygwin DLL version info:
        DLL version: 1.7.15
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 260
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


No Cygwin services found.


Cygwin Package Information
Last downloaded files to: C:\Documents and Settings\fkettwig\My Documents\Downloads
Last downloaded files from: http://cygwin.mirrorcatalogs.com/

Package              Version              Status
_autorebase          000064-1             OK
_update-info-dir     01049-1              OK
alternatives         1.3.30c-10           OK
autossh              1.4c-1               OK
base-cygwin          3.1-1                OK
base-files           4.1-1                OK
bash                 4.1.10-4             OK
bzip2                1.0.6-2              OK
coreutils            8.15-1               OK
crypt                1.2-1                OK
csih                 0.9.6-1              OK
cygrunsrv            1.40-2               OK
cygutils             1.4.10-2             OK
cygwin               1.7.15-1             OK
cygwin-doc           1.7-1                OK
dash                 0.5.7-1              OK
diffutils            3.2-1                OK
dos2unix             6.0-1                OK
editrights           1.01-2               OK
file                 5.11-1               OK
findutils            4.5.9-2              OK
gawk                 4.0.1-1              OK
gettext              0.18.1.1-2           OK
grep                 2.6.3-1              OK
groff                1.21-2               OK
gzip                 1.4-1                OK
ipc-utils            1.0-1                OK
less                 444-1                OK
libasn1_8            1.5.2-2              OK
libattr1             2.4.46-1             OK
libbz2_1             1.0.6-2              OK
libcom_err2          1.41.14-1            OK
libdb4.5             4.5.20.2-3           OK
libedit0             20120311-1           OK
libgcc1              4.5.3-3              OK
libgdbm4             1.8.3-20             OK
libgmp3              4.3.2-1              OK
libgssapi3           1.5.2-2              OK
libheimbase1         1.5.2-2              OK
libheimntlm0         1.5.2-2              OK
libhx509_5           1.5.2-2              OK
libiconv2            1.14-2               OK
libintl8             0.18.1.1-2           OK
libkafs0             1.5.2-2              OK
libkrb5_26           1.5.2-2              OK
liblzma5             5.0.2_20110517-1     OK
libncurses10         5.7-18               OK
libncursesw10        5.7-18               OK
libopenssl100        1.0.1c-1             OK
libpcre0             8.21-2               OK
libpopt0             1.6.4-4              OK
libreadline7         6.1.2-3              OK
libroken18           1.5.2-2              OK
libsigsegv2          2.10-1               OK
libsqlite3_0         3.7.3-1              OK
libssp0              4.5.3-3              OK
libstdc++6           4.5.3-3              OK
libwind0             1.5.2-2              OK
libwrap0             7.6-21               OK
login                1.10-10              OK
man                  1.6g-1               OK
mintty               1.0.3-1              OK
openssh              6.0p1-1              OK
perl                 5.10.1-5             OK
perl_manpages        5.10.1-5             OK
ping                 1.0-1                OK
rebase               4.1.0-1              OK
rsync                3.0.9-1              OK
run                  1.1.13-1             OK
sed                  4.2.1-2              OK
tar                  1.25-1               OK
terminfo             5.7_20091114-14      OK
texinfo              4.13-4               OK
tzcode               2012b-1              OK
vim                  7.3.447-1            OK
vim-common           7.3.447-1            OK
which                2.20-2               OK
xxd                  7.3.447-1            OK
xz                   5.0.2_20110517-1     OK
zlib0                1.2.5-1              OK
Use -h to see help about each section

[-- Attachment #3: test.java --]
[-- Type: application/octet-stream, Size: 355 bytes --]

package test;

public class test
{
	public test()
	{
		Runtime.getRuntime().addShutdownHook(new Thread()
		{
			public void run()
			{
				System.out.println("Stopping");
			}
		});
	}

	public static void main(String[] args) throws Exception
	{
		System.out.println("Started...");
		new test();
		Thread.sleep(Long.MAX_VALUE);
	}
}

[-- Attachment #4: Type: text/plain, Size: 218 bytes --]

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-11 17:30 SIGINT not passed to java process Franz Kettwig
@ 2012-05-17 15:31 ` Olivier Lefevre
  2012-05-17 17:23   ` Christopher Faylor
  2012-05-22 16:26 ` Olivier Lefevre
  2013-02-28  8:51 ` Thomas Wolff
  2 siblings, 1 reply; 12+ messages in thread
From: Olivier Lefevre @ 2012-05-17 15:31 UTC (permalink / raw)
  To: cygwin

On 5/11/2012 7:29 PM, Franz Kettwig wrote:
> After updating to the latest cygwin, my Java processes no longer receive SIGINT signals.  [...]

I can attest that Franz is not the only one with this problem. I just upgraded to Cygwin 1.7.15-1
but in vain. Is a fix in the works?

Regards,

-- O.L.


--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-17 15:31 ` Olivier Lefevre
@ 2012-05-17 17:23   ` Christopher Faylor
  2012-05-18 16:49     ` Olivier Lefevre
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2012-05-17 17:23 UTC (permalink / raw)
  To: cygwin

On Thu, May 17, 2012 at 05:30:26PM +0200, Olivier Lefevre wrote:
>On 5/11/2012 7:29 PM, Franz Kettwig wrote:
>>After updating to the latest cygwin, my Java processes no longer
>>receive SIGINT signals.  [...]
>
>I can attest that Franz is not the only one with this problem.  I just
>upgraded to Cygwin 1.7.15-1 but in vain.  Is a fix in the works?

Not from me.  I don't do Java.

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-17 17:23   ` Christopher Faylor
@ 2012-05-18 16:49     ` Olivier Lefevre
  2012-05-18 17:10       ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Olivier Lefevre @ 2012-05-18 16:49 UTC (permalink / raw)
  To: cygwin

python has the same problem. If you send it a Ctrl-C under cmd.com it
will print "KeyboardInterrupt" whereas under Cygwin it prints nothing.
Is python more to your taste?

On 5/17/2012 7:23 PM, Christopher Faylor wrote:
> On Thu, May 17, 2012 at 05:30:26PM +0200, Olivier Lefevre wrote:
>> On 5/11/2012 7:29 PM, Franz Kettwig wrote:
>>> After updating to the latest cygwin, my Java processes no longer
>>> receive SIGINT signals.  [...]
>>
>> I can attest that Franz is not the only one with this problem.  I just
>> upgraded to Cygwin 1.7.15-1 but in vain.  Is a fix in the works?
>
> Not from me.  I don't do Java.



--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-18 16:49     ` Olivier Lefevre
@ 2012-05-18 17:10       ` Christopher Faylor
  2012-05-18 17:33         ` Earnie Boyd
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2012-05-18 17:10 UTC (permalink / raw)
  To: cygwin

On Fri, May 18, 2012 at 06:48:56PM +0200, Olivier Lefevre wrote:
>On 5/17/2012 7:23 PM, Christopher Faylor wrote:
>> On Thu, May 17, 2012 at 05:30:26PM +0200, Olivier Lefevre wrote:
>>> On 5/11/2012 7:29 PM, Franz Kettwig wrote:
>>>> After updating to the latest cygwin, my Java processes no longer
>>>> receive SIGINT signals.  [...]
>>>
>>> I can attest that Franz is not the only one with this problem.  I just
>>> upgraded to Cygwin 1.7.15-1 but in vain.  Is a fix in the works?
>>
>> Not from me.  I don't do Java.
>
>python has the same problem. If you send it a Ctrl-C under cmd.com it
>will print "KeyboardInterrupt" whereas under Cygwin it prints nothing.
>Is python more to your taste?

Presumably you are referring to a native windows version of python, since:

  d:\cyginst>bash
  bash-4.1$ python
  Python 2.6.7 (r267:88850, Feb  2 2012, 23:50:20)
  [GCC 4.5.3] on cygwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> >Hit CTRL-C here<
  KeyboardInterrupt

I know this is an astonishing, maybe even revolutionary idea, but maybe
somebody who wants to use these native windows applications under Cygwin
might want to step up to debug this type of thing.

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-18 17:10       ` Christopher Faylor
@ 2012-05-18 17:33         ` Earnie Boyd
  2012-05-18 17:55           ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Earnie Boyd @ 2012-05-18 17:33 UTC (permalink / raw)
  To: cygwin

On Fri, May 18, 2012 at 1:10 PM, Christopher Faylor wrote:
>  d:\cyginst>bash
>  bash-4.1$ python
>  Python 2.6.7 (r267:88850, Feb  2 2012, 23:50:20)
>  [GCC 4.5.3] on cygwin
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> >Hit CTRL-C here<
>  KeyboardInterrupt
>
> I know this is an astonishing, maybe even revolutionary idea, but maybe
> somebody who wants to use these native windows applications under Cygwin
> might want to step up to debug this type of thing.

I'm not offering to do that but will venture to guess that the text
back to the terminal is perhaps causing a block on the pipe leaving a
hung process.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-18 17:33         ` Earnie Boyd
@ 2012-05-18 17:55           ` Christopher Faylor
  2012-05-18 18:19             ` Earnie Boyd
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2012-05-18 17:55 UTC (permalink / raw)
  To: cygwin

On Fri, May 18, 2012 at 01:33:08PM -0400, Earnie Boyd wrote:
>On Fri, May 18, 2012 at 1:10 PM, Christopher Faylor wrote:
>> ??d:\cyginst>bash
>> ??bash-4.1$ python
>> ??Python 2.6.7 (r267:88850, Feb ??2 2012, 23:50:20)
>> ??[GCC 4.5.3] on cygwin
>> ??Type "help", "copyright", "credits" or "license" for more information.
>> ??>>> >Hit CTRL-C here<
>> ??KeyboardInterrupt
>>
>> I know this is an astonishing, maybe even revolutionary idea, but maybe
>> somebody who wants to use these native windows applications under Cygwin
>> might want to step up to debug this type of thing.
>
>I'm not offering to do that but will venture to guess that the text
>back to the terminal is perhaps causing a block on the pipe leaving a
>hung process.

There's no pipe when you're running in "cmd.com", as was reported for
python.

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-18 17:55           ` Christopher Faylor
@ 2012-05-18 18:19             ` Earnie Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Earnie Boyd @ 2012-05-18 18:19 UTC (permalink / raw)
  To: cygwin

On Fri, May 18, 2012 at 1:54 PM, Christopher Faylor wrote:
> On Fri, May 18, 2012 at 01:33:08PM -0400, Earnie Boyd wrote:
>>On Fri, May 18, 2012 at 1:10 PM, Christopher Faylor wrote:
>>> ??d:\cyginst>bash
>>> ??bash-4.1$ python
>>> ??Python 2.6.7 (r267:88850, Feb ??2 2012, 23:50:20)
>>> ??[GCC 4.5.3] on cygwin
>>> ??Type "help", "copyright", "credits" or "license" for more information.
>>> ??>>> >Hit CTRL-C here<
>>> ??KeyboardInterrupt
>>>
>>> I know this is an astonishing, maybe even revolutionary idea, but maybe
>>> somebody who wants to use these native windows applications under Cygwin
>>> might want to step up to debug this type of thing.
>>
>>I'm not offering to do that but will venture to guess that the text
>>back to the terminal is perhaps causing a block on the pipe leaving a
>>hung process.
>
> There's no pipe when you're running in "cmd.com", as was reported for
> python.

I thought the conversation stemmed from inter-process communication of
a signal between Cygwin runtime and native runtime applications.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-11 17:30 SIGINT not passed to java process Franz Kettwig
  2012-05-17 15:31 ` Olivier Lefevre
@ 2012-05-22 16:26 ` Olivier Lefevre
  2013-02-26 14:39   ` Escay
  2013-02-28  8:51 ` Thomas Wolff
  2 siblings, 1 reply; 12+ messages in thread
From: Olivier Lefevre @ 2012-05-22 16:26 UTC (permalink / raw)
  To: cygwin

Since apparently nobody wants to take ownership of this regression
I'll point out the workaround, for the benefit of those googling
and landing on this thread: start Java with -Xrs and use Ctrl-Break
instead of Ctrl-C. This will disable thread dump and break any
application that relies on normal signal handling, though.

-- O.L.


--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-22 16:26 ` Olivier Lefevre
@ 2013-02-26 14:39   ` Escay
  2013-02-26 14:51     ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Escay @ 2013-02-26 14:39 UTC (permalink / raw)
  To: cygwin

Olivier Lefevre <lefevrol <at> yahoo.com> writes:

> 
> Since apparently nobody wants to take ownership of this regression
> I'll point out the workaround, for the benefit of those googling
> and landing on this thread: start Java with -Xrs and use Ctrl-Break
> instead of Ctrl-C. This will disable thread dump and break any
> application that relies on normal signal handling, though.
> 

For me the following solution worked:
http://stackoverflow.com/questions/8014916/control-break-not-working-in-java-using-cygwin

Add global env variable 'CYGWIN' and set the value to 'tty'.
Now CTRL+C works for me.



--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2013-02-26 14:39   ` Escay
@ 2013-02-26 14:51     ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2013-02-26 14:51 UTC (permalink / raw)
  To: cygwin

On Feb 26 12:31, Escay wrote:
> Olivier Lefevre <lefevrol <at> yahoo.com> writes:
> 
> > 
> > Since apparently nobody wants to take ownership of this regression
> > I'll point out the workaround, for the benefit of those googling
> > and landing on this thread: start Java with -Xrs and use Ctrl-Break
> > instead of Ctrl-C. This will disable thread dump and break any
> > application that relies on normal signal handling, though.
> > 
> 
> For me the following solution worked:
> http://stackoverflow.com/questions/8014916/control-break-not-working-in-java-using-cygwin
> 
> Add global env variable 'CYGWIN' and set the value to 'tty'.
> Now CTRL+C works for me.

You're using an old version of Cygwin.  The CYGWIN=(no)tty option
has been removed a while ago:

http://cygwin.com/ml/cygwin-announce/2012-02/msg00008.html

http://cygwin.com/cygwin-ug-net/using-cygwinenv.html


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: SIGINT not passed to java process
  2012-05-11 17:30 SIGINT not passed to java process Franz Kettwig
  2012-05-17 15:31 ` Olivier Lefevre
  2012-05-22 16:26 ` Olivier Lefevre
@ 2013-02-28  8:51 ` Thomas Wolff
  2 siblings, 0 replies; 12+ messages in thread
From: Thomas Wolff @ 2013-02-28  8:51 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-02-28  8:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-11 17:30 SIGINT not passed to java process Franz Kettwig
2012-05-17 15:31 ` Olivier Lefevre
2012-05-17 17:23   ` Christopher Faylor
2012-05-18 16:49     ` Olivier Lefevre
2012-05-18 17:10       ` Christopher Faylor
2012-05-18 17:33         ` Earnie Boyd
2012-05-18 17:55           ` Christopher Faylor
2012-05-18 18:19             ` Earnie Boyd
2012-05-22 16:26 ` Olivier Lefevre
2013-02-26 14:39   ` Escay
2013-02-26 14:51     ` Corinna Vinschen
2013-02-28  8:51 ` Thomas Wolff

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).