/** * Cleans up the crawler after it has finished. */ protected function cleanup() { // Free/unlock caches $this->CookieCache->cleanup(); $this->LinkCache->cleanup(); // Delete working-dir PHPCrawlerUtils::rmDir($this->working_directory); // Remove semaphore (if multiprocess-mode) if ($this->multiprocess_mode != PHPCrawlerMultiProcessModes::MPMODE_NONE) { $sem_key = sem_get($this->crawler_uniqid); sem_remove($sem_key); } }