void Debugger::Stop() { TRACE(2, "Debugger::Stop\n"); LogShutdown(ShutdownKind::Normal); s_debugger.m_proxyMap.clear(); DebuggerServer::Stop(); if (s_clientStarted) { DebuggerClient::Stop(); } }
//---------------------------------------------------------------------------- bool LogInitlize () { LogShutdown(); sFilename = 0; sLine = 0; sLogLevel = 0; sNumHandlers = 0; return true; }
void Debugger::Stop() { TRACE(2, "Debugger::Stop\n"); LogShutdown(ShutdownKind::Normal); while (!get().m_proxyMap.empty()) { get().m_proxyMap.begin()->second->stop(); } DebuggerServer::Stop(); CleanupRetiredProxies(); if (s_clientStarted) { DebuggerClient::Stop(); } }
int XplServiceMain(int argc, char *argv[]) { BOOL recover; int ccode; int startupOpts; LogStart(); if (XplSetRealUser(MsgGetUnprivilegedUser()) < 0) { Log(LOG_ERROR, "Could not drop to unprivileged user '%s'", MsgGetUnprivilegedUser()); return -1; } XplInit(); /* Set the default port */ Agent.agent.port = BONGO_QUEUE_PORT; /* Initialize the Bongo libraries */ startupOpts = BA_STARTUP_CONNIO | BA_STARTUP_NMAP | BA_STARTUP_MSGLIB | BA_STARTUP_MSGAUTH; ccode = BongoAgentInit(&Agent.agent, AGENT_NAME, DEFAULT_CONNECTION_TIMEOUT, startupOpts); if (ccode == -1) { Log(LOG_ERROR, "Initialization failed exiting."); return -1; } XplRWLockInit(&Conf.lock); XplSafeWrite(Agent.activeThreads, 0); ReadConfiguration(&recover); BongoAgentAddConfigMonitor(&Agent.agent, CheckConfig); BongoAgentAddDiskMonitor(&Agent.agent, CheckDiskspace); // Load monitor disabled, see CheckLoad() //BongoAgentAddLoadMonitor(&Agent.agent, CheckLoad); Agent.clientListener = ServerSocketInit(Agent.agent.port); if (Agent.clientListener == NULL) { Log(LOG_ERROR, "Server Initialization failed exiting."); return -1; } if (QueueInit() == FALSE) { Log(LOG_ERROR, "Queue Initialization failed exiting."); return -1; } LoadProtocolCommandTree(&Agent.authCommands, authCommands); LoadProtocolCommandTree(&Agent.commands, commands); /* FIXME: We want to pool work on the command level rather than * the connection level. Until then the threadpool will have a * thread per client, so no (practical) limit */ Agent.clientThreadPool = BongoThreadPoolNew("Queue Clients", STACKSPACE_Q, 2, INT_MAX, 0); XplSignalHandler(SignalHandler); ccode = CreateQueueThreads(recover); BongoAgentStartMonitor(&Agent.agent); MsgSetRecoveryFlag("queue"); /* Start the server thread */ XplStartMainThread(AGENT_NAME, &id, QueueServer, 8192, NULL, ccode); LogShutdown(); XplUnloadApp(XplGetThreadID()); return 0; }