From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8549 invoked by alias); 26 May 2004 14:21:29 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8365 invoked from network); 26 May 2004 14:21:20 -0000 Received: from unknown (HELO mailer.ics.de) (193.141.225.11) by sourceware.org with SMTP; 26 May 2004 14:21:20 -0000 Received: from london.ics.de (london.ics.de [193.141.225.17]) by mailer.ics.de (Postfix external) with ESMTP id 41218106B0 for ; Wed, 26 May 2004 16:21:13 +0200 (MEST) Received: from ics.de (london.ics.de [193.141.225.17]) by london.ics.de (Postfix internal) with ESMTP id 1BA6343E90 for ; Wed, 26 May 2004 16:21:06 +0200 (MEST) Message-ID: <40B4A7CB.1000402@ics.de> Date: Wed, 26 May 2004 15:50:00 -0000 From: Thomas Kloeber Reply-To: kloeber@ics.de Organization: ICS GmbH (http://www.ics.de) User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Signal Handling of CYGWIN under VMware Workstation Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2004-05/txt/msg00854.txt.bz2 Folks'es, i'm using cygwin 1.5.9-1 on Windows NT 4SP6 and W2K, both of which run on top of VMware Workstation 4.5.1 (host system is W2K on a Dell Precision 340). i have a problem with a database application server (a port from Unix using cygwin): if i shut down the application from a bash/ksh via CTRL+C the application receives the signal but, instead of performing its shutdown procedure, the process dissappears immediately, leaving my DB in an inconsitent state. if i do the same from a DOS cmd, the server process shuts down ok. i see the same behaviour if i shutdown the process via a 'control panel', which sends the server process a SIGTERM, in 2 out of 3 cases the process stops immediately without performing its proper shutdown. however, if i run the application incl cygwin on a native system, everything works just fine. so my question is, what is the connection/difference between VMware and Cygwin signal handling? thomas i have written a little test program which demonstrates the behaviour. if i run it in a ksh and hit CRTL+C, the process receives the signal and terminates. if i run it in DOS cmd, the process receives the signal, does its count down and then terminates: #include "stdafx.h" #include "signal.h" #include #include void goHome(int s) { printf("Received signal %d\n", s); for (int i = 10; i > 0; i--) { printf("Need %2d more seconds to terminate\r", i); Sleep(1000L); } exit(0); } int main(int argc, char *argv[]) { signal(SIGINT, goHome); printf("Hit Ctrl+C to terminate me\n"); while (1) { Sleep(1000); } return 0; } -- It has never been easier to help someone who suffers from hunger, and use the web for a good purpose: http://www.thehungersite.com/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/