lib/jetty-rackup/bootstrap.rb in jetty-rackup-7.1.0 vs lib/jetty-rackup/bootstrap.rb in jetty-rackup-7.2.0

- old
+ new

@@ -3,11 +3,10 @@ # automatic = false server_type = nil env = "development" -pid = nil options = {:Port => 9292, :Host => "0.0.0.0", :AccessLog => []} opts = OptionParser.new("", 24, ' ') { |opts| opts.banner = "Usage: jetty_rackup [ruby options] [rack options] [rackup config]" @@ -57,11 +56,13 @@ opts.on("-D", "--daemonize", "run daemonized in the background - does not work with JRuby - please use a wrapper shell script") { |d| daemonize = d ? true : false } - opts.on("-P", "--pid FILE", "file to store PID (default: rack.pid)") { |f| - pid = File.expand_path(f) + opts.on("-P", "--pid FILE", "file to store PID") { |file| + file = File.expand_path(file) + puts "Creating PID file '#{file}'" + File.write(file, java.io.File.new('/proc/self').canonical_file.name) } opts.separator "" opts.separator "Common options:"