/** * get more ten lines * @param $data * @param ReaderInterface $reader * @return string */ public function getErrorMessage($data, ReaderInterface $reader) { $message = $data; $max_line = 10; for ($i = 0; $i < $max_line; $i++) { $message .= $reader->read(); } return $message; }
protected function signalHandler($signal) { switch ($signal) { case SIGTERM: $this->reader->close(); unset($this->reader); unset($this->filter); unset($this->notify); exit(0); } }