english/libraries/joomla/application/cli/daemon.php
/**
	 * Spawn daemon process.
	 *
	 * @return  boolean  True if successfully spawned
	 *
	 * @since   11.1
	 */
Spawn daemon process.
@return  boolean  True if successfully spawned


Spawn daemon process . @return boolean True if successfully spawned
public function start()
	{
		if (function_exists('gc_enable')) {
			gc_enable();
		}
		JLog::add('Starting '.$this->name, JLog::INFO);
		if ($this->daemonize()) {
			while (true)
			{
				$this->gc();
				usleep(1000);
				$this->execute();
			}
		}
		else {
			JLog::add('Starting '.$this->name.' failed', JLog::INFO);
		}
	}
public function start ( ) { if ( function_exists ( 'gc_enable' ) ) { gc_enable ( ) ; } JLog :: add ( 'Starting ' . $ this -> name , JLog :: INFO ) ; if ( $ this -> daemonize ( ) ) { while ( true ) { $ this -> gc ( ) ; usleep ( 1000 ) ; $ this -> execute ( ) ; } } else { JLog :: add ( 'Starting ' . $ this -> name . ' failed' , JLog :: INFO ) ; } }
Spawn daemon process.
Spawn daemon process .
// Enable basic garbage collection.  Only available in PHP 5.3+ // Set off the process for becoming a daemon. // Daemonization succeeded (is that a word?), so now we start our main execution loop. // Perform basic garbage collection. // Don't completely overload the CPU. // Execute the main daemon logic. // We were not able to daemonize the application so log the failure and die gracefully.