english/libraries/joomla/application/cli/daemon.php
/**
	 * Method to write the process id file out to disk.
	 *
	 * @return  boolean
	 *
	 * @since   11.1
	 */
Method to write the process id file out to disk.
@return  boolean


Method to write the process id file out to disk . @return boolean
protected function writeProcessIdFile()
	{
		if ($this->processId < 1) {
			JLog::add('The process id is invalid.', JLog::EMERGENCY);
			return false;
		}
		$file = $this->config->get('application_pid_file');
		if (empty($file)) {
			JLog::add('The process id file path is empty.', JLog::ERROR);
			return false;
		}
		$folder = dirname($file);
		if (!is_dir($folder) && !JFolder::create($folder)) {
			JLog::add('Unable to create directory: '.$folder, JLog::ERROR);
			return false;
		}
		if (!file_put_contents($file, $this->processId)) {
			JLog::add('Unable to write proccess id file: '.$file, JLog::ERROR);
			return false;
		}
		if (!chmod($file, 0644)) {
			JLog::add('Unable to adjust permissions for the proccess id file: '.$file, JLog::ERROR);
			return false;
		}
		return true;
	}
protected function writeProcessIdFile ( ) { if ( $ this -> processId < 1 ) { JLog :: add ( 'The process id is invalid.' , JLog :: EMERGENCY ) ; return false ; } $ file = $ this -> config -> get ( 'application_pid_file' ) ; if ( empty ( $ file ) ) { JLog :: add ( 'The process id file path is empty.' , JLog :: ERROR ) ; return false ; } $ folder = dirname ( $ file ) ; if ( ! is_dir ( $ folder ) && ! JFolder :: create ( $ folder ) ) { JLog :: add ( 'Unable to create directory: ' . $ folder , JLog :: ERROR ) ; return false ; } if ( ! file_put_contents ( $ file , $ this -> processId ) ) { JLog :: add ( 'Unable to write proccess id file: ' . $ file , JLog :: ERROR ) ; return false ; } if ( ! chmod ( $ file , 0644 ) ) { JLog :: add ( 'Unable to adjust permissions for the proccess id file: ' . $ file , JLog :: ERROR ) ; return false ; } return true ; }
Method to write the process id file out to disk.
Method to write the process id file out to disk .
// Verify the process id is valid. // Get the application process id file path. // Make sure that the folder where we are writing the process id file exists. // Write the process id file out to disk. // Make sure the permissions for the proccess id file are accurate.