On Sat, 13 Jul 2013 20:59:15 -0400
Eric Covener <[email protected]> wrote:
> 
> I also noticed that the service.c code will wait forever, would a cap
> on that +  an error make sense?  While the stack above was trying to
> exit, the -k stop proc was here:
> 
>    739:     do {
>    740:         Sleep(1000);
>    741:         if (!QueryServiceStatus(schService,
> &globdat.ssStatus)) 742:             return FALSE;
> >  743:     } while (globdat.ssStatus.dwCurrentState == pending);
>    744:
>    745:     return (globdat.ssStatus.dwCurrentState == complete);
>    746: }

I believe it is too late to log an error anyways, except perhaps back
in the event log, which was previously closed up when httpd file-based
error logging was invoked?

I also believe windows server will forcibly shut down a service stuck
in pending state which is why I never felt it was necessary to add yet
another timeout here.  Depending on database, logging activity and the
like, a shutdown can be a time consuming process, and we aren't really
in the position to define that 'optimal' shutdown period, are we?


Reply via email to