From 1bef7dec61212f585288377a9fbc42ef91f5b6de Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 5 Apr 2014 09:37:59 -0700 Subject: [PATCH] Add comment to clarify --- lib/vagrant/environment.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 21e06bd3d..63be3aecb 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -516,6 +516,8 @@ module Vagrant # Attempt to write into the home directory to verify we can begin + # Append a random suffix to avoid race conditions if Vagrant + # is running in parallel with other Vagrant processes. suffix = (0...32).map { (65 + rand(26)).chr }.join path = @home_path.join("perm_test_#{suffix}") path.open("w") do |f|