Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <8F23E55D511AD5119A6800D0B76FDDE1CA2EEE@cpex3.channelpoint.com> From: Troy Noble To: "'cygwin AT cygwin DOT com'" Subject: broken CTRL-BREAK handling Date: Tue, 17 Jul 2001 13:00:25 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Scanned-By: MIMEDefang 1.0 (http://www.roaringpenguin.com/mimedefang/) In exceptions.cc:ctrl_c_handler I think the following code should be added: /* Return FALSE to allow other control handlers to handle CTRL-BREAK */ if (type == CTRL_BREAK_EVENT) return FALSE; before the section of code that checks the pids, sids, pgids etc. and eventually culminates in a kill (-myself->pid, SIGINT); Without this code, the current behavior in cygwin 1.3.2 is to send SIGINT to the process group whether you press CTRL-C or CTRL-BREAK. Certain Win32 programs like JDK's java have their own Ctrl handlers that watch for CTRL_BREAK_EVENT and dump a stack trace to stdout when you press CTRL_BREAK or the [X] button in the upper right of the console window. Since cygwin's ctrl_c_handler traps the CTRL_BREAK_EVENT and kills the process group, the JVM never gets a chance to handle the CTRL_BREAK_EVENT itself. I have been using the cygwin-1.3.2-1, which is where I saw this. So I also checked the latest cvs sources, and it's broken there too. Thoughts? Should I submit a patch to this effect? I have of course patched and recompiled my own DLL, and it works great. But thought you might want to know about it too. Thanks, Troy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/