[Date Prev][Date Next]
RE: new code for slapd as NT service
One area of immediate concern is the correct interaction with the Windows NT
Service Control Manager (SCM), especially during startup and shutdown
The SCM expects to receive SERVICE_START_PENDING message at some
pre-described intervals until startup processing is complete, at which case
a SERVICE_RUNNING message should be sent.
If the SCM does not receive either of these messages before the prevoius
WaitHint lapses, it issues an assassin to kill the process and reports the
error "The service failed to respond" (or something like that)
I found that after buildig the latest source, that I was getting this error,
and tacked it down to an exit(1); call in attr_syntax_config. This was
because my XXX.at.conf files defined an attribute twice and was easy enought
to fix, but it highlights the problem of having several exit points in the
Because of the exit() call, I am unsure if all opened resources were closed
Somehow we need to find a way to clean up the termination processing.
Normally when I design NT services, I keep this in mind, but its a little
harder with a port from existing code.
Also to note is the use of exit() after a SERVICE_RUNNING message is sent to
the SCM. In this case, no trace of the process will exist in the system
memory, but the SCM database will still show the service as running.
Attempting to stop the service from the SCM Control Panel applet will
eventually result in the message "The service failed to respond to the
The the service had sent a SERVICE_STOPPED message to the SCM before calling
exit() then the SCM database would reflect the correct operational state.
> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> Sent: Thursday, 17 June 1999 19:07
> To: 'openldap-devel@OpenLDAP.org'
> Cc: Gary Williams
> Subject: Re: new code for slapd as NT service
> At 03:34 PM 6/16/99 -0700, Kurt D. Zeilenga wrote:
> >I backed the code out temporarily as it broke our UNIX builds.
> >Should be reintegrated soon.
> This code, plus necessary changes to resolve build issues, has
> been committed.
> Suggestions on how to deal with NT integration issues are
> quite welcomed.