vagrant

https://github.com/mitchellh/vagrant

Ruby

Vagrant is a tool for building and distributing development environments.

Vagrant::MachineIndex#lock_machine

Locks a machine exclusively to us, returning the file handle
that holds the lock.

If the lock cannot be acquired, then nil is returned.

This should be called within an index lock.

Source | Google | Stack overflow

Edit

git clone [email protected]:mitchellh/vagrant.git

cd vagrant

open lib/vagrant/machine_index.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Vagrant--MachineIndex-lock_machine-for-pr


# Commit to git

git add lib/vagrant/machine_index.rbgit commit -m "better docs for Vagrant::MachineIndex#lock_machine"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Vagrant--MachineIndex-lock_machine-for-pr

hub pull-request


# Celebrate!