protected function kill_maxtime_violators()
	{
		foreach ($this->forked_children as $pid => $pid_info)
		{
			if ($pid_info['status'] == self::STOPPED)
			{
				continue;
			}

			if ($this->child_max_run_time[$pid_info['bucket']] >= 0 && (time() - $pid_info['ctime']) > $this->child_max_run_time[$pid_info['bucket']])
			{
				$this->log('Force kill ' . $pid . ' has run too long', self::LOG_LEVEL_INFO);

				// notify app that child process timed out
				$this->invoke_callback($this->child_function_timeout{$pid_info['bucket']}, array($pid, $pid_info['identifier']), true);

				$this->safe_kill($pid, SIGKILL); // its probably stuck on something, kill it immediately.
				sleep(3); // give the child time to die

				// force signal handling
				$this->signal_handler_sigchild(SIGCHLD);
			}
		}
	}
protected function kill_maxtime_violators()
	{
		foreach ($this->forked_children as $pid => $pid_info)
		{
			if ($pid_info['status'] == self::STOPPED)
			{
				continue;
			}

			if ($this->child_max_run_time[$pid_info['bucket']] >= 0 && (time() - $pid_info['ctime']) > $this->child_max_run_time[$pid_info['bucket']])
			{
				$this->log('Force kill ' . $pid . ' has run too long', self::LOG_LEVEL_INFO);

				// notify app that child process timed out
				$this->invoke_callback($this->child_function_timeout{$pid_info['bucket']}, array($pid, $pid_info['identifier']), true);

				$this->safe_kill($pid, SIGKILL); // its probably stuck on something, kill it immediately.
				sleep(3); // give the child time to die

				// force signal handling
				$this->signal_handler_sigchild(SIGCHLD);
			}
		}
	}
protected function kill_maxtime_violators ( ) { foreach ( $ this -> forked_children as $ pid => $ pid_info ) { if ( $ pid_info [ 'status' ] == self :: STOPPED ) { continue ; } if ( $ this -> child_max_run_time [ $ pid_info [ 'bucket' ] ] >= 0 && ( time ( ) - $ pid_info [ 'ctime' ] ) > $ this -> child_max_run_time [ $ pid_info [ 'bucket' ] ] ) { $ this -> log ( 'Force kill ' . $ pid . ' has run too long' , self :: LOG_LEVEL_INFO ) ; // notify app that child process timed out $ this -> invoke_callback ( $ this -> child_function_timeout { $ pid_info [ 'bucket' ] } , array ( $ pid , $ pid_info [ 'identifier' ] ) , true ) ; $ this -> safe_kill ( $ pid , SIGKILL ) ; // its probably stuck on something, kill it immediately. sleep ( 3 ) ; // give the child time to die // force signal handling $ this -> signal_handler_sigchild ( SIGCHLD ) ; } } }
Kills any children that have been running for too long.
@access protected
@return void
Kills any children that have been running for too long .