/** * Force the agent process to shut down. Returns true if it was shut down, * or false if it wasn't started. */ virtual bool forceShutdown() { lock_guard<boost::mutex> l(lock); if (pid == 0) { return false; } else { killAndWait(pid); this->pid = 0; return true; } }
void setupDirectoryIndexes(){ if(existsFile(getDataDirectory())){ if(isInfoEnabled()) info(concatAll( 3, "Usando " , getDataDirectory() , " como directorio de indices")); }else{ if(isInfoEnabled()) info(concatAll(2 , "No existe el directorio " , getDataDirectory())); if(createDirectory(getDataDirectory())){ if(isInfoEnabled()) info(concatAll(2 , "Se crea " , getDataDirectory())); }else{ if(isInfoEnabled()) info(concatAll(2 , "No se pudo crear el directorio " , getDataDirectory())); killAndWait(1); return; } } }