DataDog/dd-agent — pull request #901 by Tenzer (2014-04-13 12:30:26+00:00)
Title: Improve check which sees if Supervisor is running

Instead of just checking if the socket file exists, we should also check if the PID written to the PID file exists. This will allow Supervisor and the Datadog agent to start up correctly again, after the two were killed or not shut down using the `agent` script.