sam / doubleshot

Build and Dependency Management for mixed Java/Ruby projects.
MIT License
19 stars 22 forks source link

.doubleshot_test.pid check should actually check if the pid is alive #54

Closed sam closed 12 years ago

sam commented 12 years ago

Right now we just check if the file exists. So even if the previous process failed in error, and the pidfile just wasn't cleaned up, it still exits and tells your to run --force.

That's unnecessary. We can just lookup the PID to see if the process is alive and delete the pidfile if not.

sam commented 12 years ago

This looks like it would do the trick: http://stackoverflow.com/a/3568291