Server IP : 66.29.132.124 / Your IP : 18.118.166.45 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/opt/cpanel/ea-ruby27/src/passenger-release-6.0.23/test/stub/rack/ |
Upload File : |
#!/usr/bin/env ruby require 'socket' STDOUT.sync = true STDERR.sync = true work_dir = ENV['PASSENGER_SPAWN_WORK_DIR'] ruby_libdir = File.read("#{work_dir}/args/ruby_libdir").strip passenger_root = File.read("#{work_dir}/args/passenger_root").strip require "#{ruby_libdir}/phusion_passenger" PhusionPassenger.locate_directories(passenger_root) PhusionPassenger.require_passenger_lib 'utils/json' if ARGV[0] == "--execself" # Used for testing https://code.google.com/p/phusion-passenger/issues/detail?id=842#c19 exec("ruby", $0) end server = TCPServer.new('127.0.0.1', 0) File.open("#{work_dir}/response/properties.json", 'w') do |f| f.write(PhusionPassenger::Utils::JSON.generate( :sockets => [ { :address => "tcp://127.0.0.1:#{server.addr[1]}", :protocol => "test", :concurrency => 1, :accept_http_requests => true } ] )) end File.open("#{work_dir}/response/finish", 'w') do |f| f.write('1') end while true ios = select([server, STDIN])[0] if ios.include?(server) client = server.accept line = client.readline if line == "ping\n" client.write("pong\n") elsif line == "pid\n" client.write("#{Process.pid}\n") elsif line == "envvars\n" str = "" ENV.each_pair do |key, value| str << "#{key} = #{value}\n" end client.write(str) else client.write("unknown request\n") end client.close end if ios.include?(STDIN) begin STDIN.readline rescue EOFError exit end end end