lib/rack/server.rb in rack-1.6.5 vs lib/rack/server.rb in rack-1.6.6
- old
+ new
@@ -1,6 +1,7 @@
require 'optparse'
+require 'fileutils'
module Rack
class Server
@@ -350,10 +351,10 @@
end
end
def write_pid
::File.open(options[:pid], ::File::CREAT | ::File::EXCL | ::File::WRONLY ){ |f| f.write("#{Process.pid}") }
- at_exit { ::File.delete(options[:pid]) if ::File.exist?(options[:pid]) }
+ at_exit { ::FileUtils.rm_f(options[:pid]) }
rescue Errno::EEXIST
check_pid!
retry
end