/** * Check if task was killed by task manager */ protected function _isLive() { if (!$this->_tm->isLive($this->_pid)) { $this->terminate(); } }