delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/27/11:59:28

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: shell-1.enteract.com: fcy set sender to fred AT ontosys DOT com using -f
Date: Fri, 27 Apr 2001 10:41:15 -0500
From: Fred Yankowski <fred AT ontosys DOT com>
To: Paul Garceau <pgarceau AT qwest DOT net>
Cc: cygwin AT cygwin DOT com
Subject: Re: Cygwin service doesn't get NT shutdown notification
Message-ID: <20010427104115.A63579@enteract.com>
References: <20010426113527 DOT A99410 AT enteract DOT com> <3AE8215E DOT 30294 DOT 3E93F1 AT localhost>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <3AE8215E.30294.3E93F1@localhost>; from pgarceau@qwest.net on Thu, Apr 26, 2001 at 01:23:42PM -0700

On Thu, Apr 26, 2001 at 01:23:42PM -0700, Paul Garceau wrote:
> 	Just guessing, but are you including a specific message handling 
> subroutine/module geared to interface between the Cygwin (bash) shell 
> and the NT4 (comspec) shell?

I don't follow your question, but bash isn't involved.  The service
process, a custom program coded in C, is started directly from the NT
Service Control Manager.

> Without being able to draw from 
> experience (another guess  -- hopefully an educated one), there is a 
> possibility that Cygwin registry settings are overwriting PostGreSQL 
> registry settings,

Fair enough guess, but I've been watching the registry and haven't
seen evidence of any such corruption.

> 	It may be that Cygwin doesn't have sufficient Access on your system 
> (user privelege) to actually launch a shut-down event from Cygwin 
> system task (bash).

It's actually the NT SCM (I think) that signals the shutdown event to
the service.  In any case, it's not any Cygwin code generating the
notification. 

> 	Setting up service using Win32api (ie. srvany.exe) from a NTVDM shell 
> (NT Virtual DOS Machine) apart from Cygwin (thereby placing service 
> directly under NT4 specific task/process controls).

I've used that configuration -- well, actually, I used the similar
'invoker' wrapper -- but neither srvany nor invoker seems to provide
any way to do a soft shutdown of the controlled service process.
Also, srvany is not freely available (as you mention later).

If I can't get this to work correctly in Cygwin, I may just write a
wrapper similar to srvany that would call a user-specified program in
the event of the stop or shutdown notifications, giving the managed
service process a chance to shutdown gracefully.

> 	Insight 5.0 might be able to help you winnow out the problem as well.

The hard part is that this problem occurs as the system is being
shutdown, making it hard to use an interactive debugger.  And I
haven't a clue what to breakpoint on.  I've put extensive traces in
the service source code, but as the event notification hander isn't
even being called it's hard to figure out what else I could watch (and
how). 

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019