def Engine::create_cache_lock
path = $config['cache_lock_path']
unless $config['cache_lock'] = File::open(path, 'w')
die "Couldn't open \"#{path}\"."
end
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."
$stdin.gets
$config['use_cache_lock'] = false
$config['save_feed_list'] = false
$config['save_feed_cache'] = false
$config['save_theme'] = false
end
end