Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f75d29c080
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (24 sloc) 0.469 kb
path = ARGV.shift
ready = IO.for_fd ARGV.shift.to_i
ready.sync = true
s = nil
begin
require 'rubygems'
require 'puma'
events = Puma::Events.new STDOUT, STDERR
app, options = Rack::Builder.parse_file "config.ru"
s = Puma::Server.new app, events
s.min_threads = 0
s.max_threads = 10
s.add_unix_listener path
Signal.trap "INT" do
s.stop
end
Signal.trap "TERM" do
s.stop
end
ensure
ready << "!"
ready.close
end
s.run.join if s
Jump to Line
Something went wrong with that request. Please try again.