Made gateway.cgi work with a ruby called anything

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 128e3526
...@@ -2,6 +2,7 @@ require "drb" ...@@ -2,6 +2,7 @@ require "drb"
ENV["RAILS_ENV"] = 'production' ENV["RAILS_ENV"] = 'production'
require "#{File.dirname(__FILE__)}/../config/environment.rb" require "#{File.dirname(__FILE__)}/../config/environment.rb"
require 'fcgi_handler' require 'fcgi_handler'
require 'rbconfig'
VERBOSE = false VERBOSE = false
...@@ -90,7 +91,10 @@ if ARGV.shift == 'start-listeners' ...@@ -90,7 +91,10 @@ if ARGV.shift == 'start-listeners'
if number > 1 if number > 1
fork do fork do
exec 'ruby', __FILE__, 'start-listeners', tracker, (number - 1).to_s exec(
File.join(Config::CONFIG['bin_dir'], Config::CONFIG['RUBY_SO_NAME']),
__FILE__, 'start-listeners', tracker, (number - 1).to_s
)
end end
end end
......
require "drb" require "drb"
require "rbconfig"
VERBOSE = false VERBOSE = false
...@@ -85,7 +86,10 @@ class Tracker ...@@ -85,7 +86,10 @@ class Tracker
tracker_uri = @uri tracker_uri = @uri
listener_path = File.join(File.dirname(__FILE__), 'listener') listener_path = File.join(File.dirname(__FILE__), 'listener')
fork do fork do
exec 'ruby', listener_path, 'start-listeners', tracker_uri, n.to_s exec(
File.join(Config::CONFIG['bin_dir'], Config::CONFIG['RUBY_SO_NAME']),
listener_path, 'start-listeners', tracker_uri, n.to_s
)
end end
end end
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
# This is an experimental feature for getting high-speed CGI by using a long-running, DRb-backed server in the background # This is an experimental feature for getting high-speed CGI by using a long-running, DRb-backed server in the background
require File.join(File.dirname(__FILE__), 'drb') require 'drb'
require 'cgi' require 'cgi'
require 'rbconfig'
VERBOSE = false VERBOSE = false
...@@ -19,7 +20,7 @@ def start_tracker ...@@ -19,7 +20,7 @@ def start_tracker
STDIN.reopen "/dev/null" STDIN.reopen "/dev/null"
STDOUT.reopen "/dev/null", "a" STDOUT.reopen "/dev/null", "a"
exec 'ruby', tracker_path, 'start', ConnectionUri exec(File.join(Config::CONFIG['bin_dir'], Config::CONFIG['RUBY_SO_NAME']), tracker_path, 'start', ConnectionUri)
end end
$stderr.puts "dispatch: waiting for tracker to start..." if VERBOSE $stderr.puts "dispatch: waiting for tracker to start..." if VERBOSE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册