Ejemplo n.º 1
0
 function killProcess()
 {
     $process = new Process();
     $process->kill();
 }
Ejemplo n.º 2
0
	// Try to send the message 3 times
	for($i = 0; $i < 3; $i++)
	{
		if($debug)
		{
			echo "Sending message\n";
		}
		
		if(!$process)
		{
			$process = new Process(1153 + $i);
			if(!$process->init())
			{
				echo "Error while starting child process\n";
				
				$process->kill();
				$process = false;
				if($debug)
				{
					echo "Sleeping 10 seconds before trying again\n";
				}
				
				sleep(10);
				continue;
			}
		}
		
		$result = $process->sendMessage($deviceToken, $value);
		if($result)
		{
			if($debug)
Ejemplo n.º 3
0
 /**
  * Kill
  *
  * @param $signal
  */
 public function kill($signal = SIGINT)
 {
     $this->child->kill($signal);
 }