setDescription("查看守护进程框架的运行状态(仅限--daemon模式可用)");
}
protected function execute(InputInterface $input, OutputInterface $output) {
parent::execute($input, $output);
$output->writeln("框架运行中,pid:" . $this->daemon_file["pid"] . "");
$output->writeln("----- 以下是stdout内容 -----");
$stdout = file_get_contents($this->daemon_file["stdout"]);
$stdout = explode("\n", $stdout);
for ($i = 10; $i > 0; --$i) {
if (isset($stdout[count($stdout) - $i]))
echo $stdout[count($stdout) - $i] . PHP_EOL;
}
return Command::SUCCESS;
}
}