puppetlabs/puppet — pull request #712 by jeffweiss (2012-04-25 17:00:01+00:00)
Title: (#13966) Fix default pidfile race condition

Commit 8b81794 introduced a race condition for the pidfile that
incorrectly defaulted all pidfiles to user.pid because of when in load
time defaults.rb was read. Run_mode bootstraps as user and then
switches to [master|agent] if necessary. This change modifies the
default pidfile value to interpolate run_mode at time of pidfile use
rather than bootstrapped run_mode. This commit restores proper
functionality for the pidfile names.