macournoyer/thin — pull request #166 by mkwiatkowski (2013-03-11 15:41:56+00:00)
Title: Force kill using already known pid

I have an app on production that sometimes causes the following problem during stop:

```
$ thin stop -C my-production-app.yml
Stopping server on 0.0.0.0:2000 ...
Sending QUIT signal to process 31054 ...
Stopping server on 0.0.0.0:2001 ...
Sending QUIT signal to process 31065 ...
Stopping server on 0.0.0.0:2002 ...
Sending QUIT signal to process 31076 ...
Timeout!
Can't stop process, no PID found in /tmp/my-production-app.2002.pid
```

and the process lives on. I'm not exactly sure what is the cause. [Celluloid](http://celluloid.io/) would be my first guess, but whatever the cause I think "thin stop" should not fail like that.

I've included a patch that fixes the issue. PID is always known when force_kill is called, so there's really no need to fetch it the second time. Please let me know if that is something you'd be willing to merge.