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 X-Authentication-Warning: shell-2.enteract.com: fcy set sender to fred AT ontosys DOT com using -f Date: Fri, 27 Apr 2001 13:10:03 -0500 From: Fred Yankowski To: cygwin AT cygwin DOT com Subject: Re: Cygwin service doesn't get NT shutdown notification -- IT DOES NOW! Message-ID: <20010427131003.A99808@enteract.com> References: <20010426113527 DOT A99410 AT enteract DOT com> <3AE8215E DOT 30294 DOT 3E93F1 AT localhost> <20010426181503 DOT C360 AT redhat DOT com> <20010427104723 DOT B63579 AT enteract DOT com> <20010427120914 DOT A7541 AT redhat DOT com> <20010427114714 DOT A66859 AT enteract DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010427114714.A66859@enteract.com>; from fred@ontosys.com on Fri, Apr 27, 2001 at 11:47:14AM -0500 Success! Thanks to a hint from Jason Tishler, I found that I overlooked one reference to "SHUTDOWN" in the Cygwin source code. (D'oh!) That code sends SIGHUP to itself in response to some window shutdown event. I don't think this shutdown event is the same as the SCM shutdown event, but in any case it kills the Cygwin process before the SCM-invoked handler gets a chance to run. I added code to my test service to catch, report, and otherwise ignore all signals. Then I started the service and left it running while I restarted my NT system (what a PITA test...). After reboot I see in the log file that SIGHUP was received. And now the service control handler also runs, getting the SHUTDOWN event and leading to clean process shutdown. Finally. Thanks for the help, all who responded. -- Fred Yankowski fred AT OntoSys DOT com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple