lib/vegas/runner.rb in vegas-0.1.9 vs lib/vegas/runner.rb in vegas-0.1.10

- old
+ new

@@ -143,15 +143,12 @@ def port_open?(check_url = nil) begin check_url ||= url options[:no_proxy] ? open(check_url, :proxy => nil) : open(check_url) false - rescue Errno::ECONNREFUSED => e + rescue Errno::ECONNREFUSED, Errno::EPERM, Errno::ETIMEDOUT true - rescue Errno::EPERM => e - # catches the "Operation not permitted" under Cygwin - true end end def write_url File.open(url_file, 'w') {|f| f << url } @@ -187,22 +184,22 @@ def daemonize! if JRUBY # It's not a true daemon but when executed with & works like one thread = Thread.new {daemon_execute} thread.join - + elsif RUBY_VERSION < "1.9" logger.debug "Parent Process: #{Process.pid}" exit!(0) if fork logger.debug "Child Process: #{Process.pid}" daemon_execute - + else Process.daemon(true, true) daemon_execute end end - + def daemon_execute File.umask 0000 FileUtils.touch log_file STDIN.reopen log_file STDOUT.reopen log_file, "a"