# File src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb, line 63
      def locked?
        if PlatformInfo.supports_flock?
          begin
            !File.open("#{@path}/lock", "r") do |f|
              f.flock(File::LOCK_EX | File::LOCK_NB)
            end
          rescue Errno::ENOENT
            false
          end
        else
          # Solaris :-(
          # Since using fcntl locks in Ruby is a huge pain,
          # we'll fallback to checking the watchdog PID.
          watchdog_alive?
        end
      end