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