test/support/apache2_controller.rb
def running?
    if File.exist?("#{@server_root}/httpd.pid")
      pid = File.read("#{@server_root}/httpd.pid").strip
      begin
        Process.kill(0, pid.to_i)
        return true
      rescue Errno::ESRCH
        return false
      rescue SystemCallError
        return true
      end
    else
      return false
    end
  end
# Checks whether this Apache instance is running.
Checks whether this Apache instance is running.
Checks whether this Apache instance is running .
def running?
    if File.exist?("#{@server_root}/httpd.pid")
      pid = File.read("#{@server_root}/httpd.pid").strip
      begin
        Process.kill(0, pid.to_i)
        return true
      rescue Errno::ESRCH
        return false
      rescue SystemCallError
        return true
      end
    else
      return false
    end
  end
def running? if File . exist? ( "#{@server_root}/httpd.pid" ) pid = File . read ( "#{@server_root}/httpd.pid" ) . strip begin Process . kill ( 0 , pid . to_i ) return true rescue Errno :: ESRCH return false rescue SystemCallError return true end else return false end end
Checks whether this Apache instance is running.
Checks whether this Apache instance is running .