Full_Name: Binoy Joseph Version: 2.4.16 OS: Windows XP URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (210.210.79.19) Hi, I compiled OpenLDAP 2.4.16 in Windows and installed it as a service. It starts successfully. But when I stop the service, slapd stops, but a Windows Application error (unknown software exception) is thrown and the service does not respond. I commented the last line in daemon.c and it works fine. 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... ? Is it already fixed in the subsequent releases?
moved from Incoming to Software Bugs
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 ); -- Hallvard
It was working earlier with OpenLDAP 2.2. But then we used MS Visual Studio 6 to compile. Now we are using Visual Studio 2005. Is it anything to do with this? -- Thanks and Regards, Binoy Joseph
Unable to reproduce. Starting and stopping service works fine, no other events are in the Windows event log.