This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygrunsrv doesn't stop service during reboot

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]