puppetlabs/puppet — pull request #415 by daniel-pittman (2012-01-27 01:36:01+00:00)
Title: Bug/2.7.x/12188 pid handling warning cleanup

Previously everyone who invoked the `unlock` method of our pid file code would
duplicate all the internal logic to issue a warning, but only if we tried and
failed to delete the PID file.

This seems redundant compared to just pushing that down to the code that
actually fails, which this commit does.

Along the way it helps ensure that we don't warn unnecessarily about PID file
deletion, and adds tests to validate that.

Signed-off-by: Daniel Pittman