* Signal Handling of CYGWIN under VMware Workstation @ 2004-05-26 15:50 Thomas Kloeber 2004-05-26 16:17 ` Signal Handling of cygwin " Christopher Faylor 0 siblings, 1 reply; 4+ messages in thread From: Thomas Kloeber @ 2004-05-26 15:50 UTC (permalink / raw) To: cygwin 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 <windows.h> #include <stdio.h> 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Signal Handling of cygwin under VMware Workstation 2004-05-26 15:50 Signal Handling of CYGWIN under VMware Workstation Thomas Kloeber @ 2004-05-26 16:17 ` Christopher Faylor 2004-05-26 16:51 ` Thomas Kloeber 0 siblings, 1 reply; 4+ messages in thread From: Christopher Faylor @ 2004-05-26 16:17 UTC (permalink / raw) To: cygwin On Wed, May 26, 2004 at 04:20:59PM +0200, Thomas Kloeber wrote: >so my question is, what is the connection/difference between VMware and >Cygwin signal handling? None. I use VMware all of the time in cygwin development. -- Christopher Faylor spammer? -> aaaspam@sourceware.org Cygwin Co-Project Leader aaaspam@duffek.com TimeSys, Inc. -- 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Signal Handling of cygwin under VMware Workstation 2004-05-26 16:17 ` Signal Handling of cygwin " Christopher Faylor @ 2004-05-26 16:51 ` Thomas Kloeber 2004-05-26 16:58 ` Brian Ford 0 siblings, 1 reply; 4+ messages in thread From: Thomas Kloeber @ 2004-05-26 16:51 UTC (permalink / raw) To: cygwin Chris, Christopher Faylor wrote: >None. I use VMware all of the time in cygwin development. > > looks like you're right. further tests show that it is a question, which shell i use: * ksh and bash: the test program receives the signal and terminates * sh: the test program receives the signal and then performs its signal handling procedure (under Solaris 2.8 the test program on all shells shows the correct behaviour.) if i use kill() to send a SIGINT to my test program running on * ksh and bash: it terminates without receiving the signal * sh: it doesn't receive the signal at all any ideas/guesses are appreciated. thomas -- 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Signal Handling of cygwin under VMware Workstation 2004-05-26 16:51 ` Thomas Kloeber @ 2004-05-26 16:58 ` Brian Ford 0 siblings, 0 replies; 4+ messages in thread From: Brian Ford @ 2004-05-26 16:58 UTC (permalink / raw) To: Thomas Kloeber; +Cc: cygwin On Wed, 26 May 2004, Thomas Kloeber wrote: > any ideas/guesses are appreciated. The first one that comes to mind is upgrade to 1.5.10-3 ;-). -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-26 15:50 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-05-26 15:50 Signal Handling of CYGWIN under VMware Workstation Thomas Kloeber 2004-05-26 16:17 ` Signal Handling of cygwin " Christopher Faylor 2004-05-26 16:51 ` Thomas Kloeber 2004-05-26 16:58 ` Brian Ford
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).