www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/21/13:51:24

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 21 Feb 2012 19:50:34 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygrunsrv doesn't stop service during reboot
Message-ID: <20120221185034.GB30467@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAKf2h5Qkdu4b1A9dpAsFDHxX-xx-emcKJH+erDD2PdtOjLv80A AT mail DOT gmail DOT com> <20120220155801 DOT GC27701 AT calimero DOT vinschen DOT de> <CAKf2h5TyjwocX4i_4bzc4wNYEp8JVGdF-kSY1W6S8FG8GNTwSQ AT mail DOT gmail DOT com> <20120221092417 DOT GB22597 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20120221092417.GB22597@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Feb 21 10:24, Corinna Vinschen wrote:
> On Feb 21 09:32, Frank Fesevur wrote:
> > 2012/2/20 Corinna Vinschen:
> > > Did you check your log?  Do you see any of these messages?  If not,
> > > I assume that the shutdown kills the service process so fast that it
> > > has no chance for the cleanup.  Which is kind of weird in case of
> > > preshutdown, given that you're supposed to have 3 minutes, at least
> > > by default...
> > 
> > I check the System log and found this error-line:
> > The CYGWIN rsyncd service did not shut down properly after receiving a
> > preshutdown control.
> 
> Weird.  I don't have the time to test that right now, though.

I tested that now and found that the preshutdown control message was
never sent to cygrunsrv's service handler function.

The reason was that cygrunsrv still called the old service register
function RegisterServiceCtrlHandler, which was already deprecated
starting with Windows 2000.  The preshutdown control code is only sent
to services which register with the new RegisterServiceCtrlHandlerEx
function.  I fixed that in cygrunsrv and tested that it really gets the
preshutdown control code now.  So the rsync daemon removes the pid file
on preshutdown now in my test.

I just uploaded a new cygrunsrv version with this fix.


Thanks for the report,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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