macournoyer/thin — Issue #79: server won't shut down after ctrl-C
Author: lsiden
Created: 2011-12-25 22:39:43+00:00
State: open

This may be related to issue https://github.com/macournoyer/thin/issues/46 and is an intentional duplicate of https://github.com/sinatra/sinatra/issues/434. Responders on the sinatra forum think this may be a 'thin' issue so I'm posting here.

For the record, sinatra is running on thin-1.3.1

After starting Sinatra from my console, then stopping with ctrl-C:

$ ruby lib/server.rb
== Sinatra/1.3.1 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
^C>> Stopping ...

== Sinatra has ended his set (crowd applauds)

Then,

$ ps -ef |grep ruby
lsiden 19447 1 1 12:02 ? 00:00:05 ruby lib/server.rb -p 5000

From this point on, if I want to restart my webapp, I have to issue a "kill" command to the process id.

Not a show-stopper, but inconvenient.