Module: Rails::MongrelServer

Defined in:
lib/rails/mongrel_server/handler.rb,
lib/rails/mongrel_server/commands.rb

Defined Under Namespace

Classes: RailsConfigurator, RailsHandler, Restart, Start, Stop

Class Method Summary collapse

Class Method Details

.send_signal(signal, pid_file) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rails/mongrel_server/commands.rb', line 16

def self.send_signal(signal, pid_file)
  pid = open(pid_file).read.to_i
  print "Sending #{signal} to Mongrel at PID #{pid}..."
  begin
    Process.kill(signal, pid)
  rescue Errno::ESRCH
    puts "Process does not exist.  Not running."
  end

  puts "Done."
end