elasticsearch/elasticsearch — pull request #8775 by s1monw (2014-12-04 09:31:00+00:00)
Title: Factor out PID file creation and add tests

This commit factors out the PID file creation from bootstrap and adds
tests for error conditions etc. We also can't rely on DELETE_ON_CLOSE
since it might not even write the file depending on the OS and JVM implementation.
This impl uses a shutdown hook to best-effort remove the pid file if it was written.

Closes #8771