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