// destroy callback resources void ap_cb_destroy(void *) { // cleanup down event notification UnRegisterEventNotification(eh); NX_UNWRAP_INTERFACE(ref); NX_UNWRAP_INTERFACE(dum); }
int daemonShutdown(const String& daemonName, const ServiceEnvironmentIFCRef& env) { #ifndef WIN32 #if defined(OW_NETWARE) (void)daemonName; { NonRecursiveMutexLock l(g_shutdownGuard); g_shutDown = true; g_shutdownCond.notifyAll(); pthread_yield(); } if(!FromEventHandler) { UnRegisterEventNotification(DownEvent); } #else String pidFile(env->getConfigItem(ConfigOpts::PIDFILE_opt, OW_DEFAULT_PIDFILE)); PidFile::removePid(pidFile.c_str()); #endif #endif shutdownSig(); return 0; }