binoy@cordys.com writes:
slap_sig_shutdown( int sig ) { .. //(void) SIGNAL_REINSTALL( sig, slap_sig_shutdown ); }
Also, another doubt. The value of sig is always -1 here. Shouldn't it one of these: SIG_DFL, SIG_ERR, SIGINT, SIGTERM... ?
Actually no. slapd/main.c does lutil_CommenceStartupProcessing( serverName, slap_sig_shutdown ); which causes liblutil/ntservice.c:lutil_ServiceCtrlHandler() to call slap_sig_shutdown(-1). (The handler is stored in stopfunc.)
Leaving the correction to a committer who knows Windows, but I assume a minimal fix would be
if (sig >= 0) SIGNAL_REINSTALL( sig, slap_sig_shutdown );