/** * @test */ public function status() { $fork = new Fork(getmypid()); $expect = 1; $fork->setStatus($expect); $this->assertSame($expect, $fork->getStatus()); }
/** * @param int $sig * @return void */ public function terminate($sig) { posix_kill($this->fork->getPid(), $sig); $status = null; $this->pcntl->waitpid($this->fork->getPid(), $status); }