protected function restart() { if (!$this->processManager->isParent()) { return; } $this->logger->debug('Going to restart the daemon ...'); $this->isRunning = false; $this->__destruct(); // // Close the resource handles to prevent this process from hanging on the exec() output. // if (is_resource(STDOUT)) { // fclose(STDOUT); // } // if (is_resource(STDERR)) { // fclose(STDERR); // } // if (is_resource(STDIN)) { // fclose(STDIN); // } // exec($this->command()); // run php command as did the user exit; }