I’d rather comment than add an answer for this, but not enough rep.
I have the same issue and found that resuming (with fg
) after typing ctrl–c then pausing (with ctrl–z, as offered above) does the trick.
So the recipe is:
- ctrl–c (does nothing right away)
- ctrl–z (pauses WEBrick, goes back to shell)
-
fg
(resumes WEBrick, immediately follow through with SIGINT)lampadmin@lampadmin-DX4840:/var/www/rails/agences$ r s => Booting WEBrick => Rails 3.0.5 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-05-14 14:25:36] INFO WEBrick 1.3.1 [2011-05-14 14:25:36] INFO ruby 1.9.2 (2011-02-18) [x86_64-linux] [2011-05-14 14:25:36] INFO WEBrick::HTTPServer#start: pid=2585 port=3000
^C^Z (<– ctrl-c, then ctrl-z)
[1]+ Stopped rails s lampadmin@lampadmin-DX4840:/var/www/rails/agences$ fg rails s [2011-05-14 14:25:45] INFO going to shutdown ... [2011-05-14 14:25:45] INFO WEBrick::HTTPServer#start done. Exiting