# File raggle, line 4999
    def Engine::create_cache_lock
      path = $config['cache_lock_path']
      
      # open cache lock for writing
      unless $config['cache_lock'] = File::open(path, 'w')
        die "Couldn't open \"#{path}\"."
      end
    
      # obtain cache lock
      unless $config['cache_lock'].flock(File::LOCK_EX | File::LOCK_NB)
        $stderr.puts "WARNING: Couldn't obtain cache lock: " << 
                     "Another instance of Raggle is running.\n"
        $stderr.puts "WARNING: Disabling feed caching for this instance."
        $stderr.puts "WARNING: Press enter to continue."
    
        # wait for user response
        $stdin.gets
    
        # disable feed caching and theme saving
        $config['use_cache_lock'] = false
        $config['save_feed_list'] = false
        $config['save_feed_cache'] = false
        $config['save_theme'] = false
      end
    end