Skip to content

Commit

Permalink
Fork a git-daemon process along with our server, useful for cloning a…
Browse files Browse the repository at this point in the history
…nd whatnot.
  • Loading branch information
radar committed Jul 25, 2009
1 parent 36f977e commit 70ebf39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/ginatra
Expand Up @@ -4,6 +4,11 @@ current_path = File.expand_path(File.dirname(__FILE__))

require "#{current_path}/../lib/ginatra"
require 'vegas'

pid = Kernel.fork { system "git-daemon --base-path=#{Ginatra::Config.git_dir} --export-all" }
Vegas::Runner.new(Ginatra::App, 'ginatra-app', :port => Ginatra::Config.port)

trap("INT", "HUP", "TERM") do
Process.kill(pid)
puts "Farewell."
end

0 comments on commit 70ebf39

Please sign in to comment.