コード例 #1
0
ファイル: os.php プロジェクト: nahidacm/designpatterns
 function killProcess()
 {
     $process = new Process();
     $process->kill();
 }
コード例 #2
0
ファイル: PushMonitor.php プロジェクト: nard/Pushchat-Server
	// 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)
コード例 #3
0
ファイル: Worker.php プロジェクト: redstarxz/php-cluster
 /**
  * Kill
  *
  * @param $signal
  */
 public function kill($signal = SIGINT)
 {
     $this->child->kill($signal);
 }