2 external service manager
3 Copyright (c) 2000 Masatoshi SEKI
21 def self.command=(cmd)
31 @thread = invoke_thread
39 server = @servers[name]
40 return server if server && server.alive?
66 invoke_service_command(name, @@command[name])
71 def invoke_service(name)
75 def invoke_service_command(name, command)
76 raise "invalid command. name: #{name}" unless command
78 return if @servers.include?(name)
79 @servers[name] = false
82 if RUBY_PLATFORM =~ /mswin32/ && /NT/ =~ ENV["OS"]
83 system(%Q'cmd /c start "ruby" /b #{command} #{uri} #{name}')
85 system("#{command} #{uri} #{name} &")