This project is archived and is in readonly mode.
Mongrel not being stopped with CTRL-C under Windows
Because of the way Rack::Handler::Mongrel instantiates the Mongrel::HttpHandler, it becomes impossible to shutdown the server with CTRL-C unless one actually enters CTRL-C and then hits the (still running) server.
This seems to be a Windows-only issue.
Attached is a patch which fixes this issue. This solution comes from the Mongrel gem source code.
Comments and changes to this ticket
Running rails via gem 2.3.2. (Also have installed the gem for mongrel 1.1.5, but I take it that appears elsewhere.) I can confirm the problematic behavior described, and confirm that this patch fixes the silly mongrel.
I manually applied the patch by adding the two new lines (trap & sleeper_thread) to mongrel.rb in c:\ruby\lib\ruby\gems\1.8\gems\actionpack-2.3.2\lib\action_controller\vendor\rack-1.0\rack\handler>.
There must be a better way to manage patches like this. Googled a ton but found no answer that made sense. Do I need to get off the gems and start using git? freeze rails 2.3.2?
Thoughts appreciated, or better yet a link as this is probably the wrong place for this question.
According to Luis Lavena, maintainer of RubyInstaller on Windows, this problem isn't related to the compiler. I can confirm the issue is still present on the newer mingw builds.
Here's a thread discussing it:
- State changed from new to open
- Tag changed from 2.3.2, mongrel, rack, server, windows to server, 232, mongrel, rack, windows
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Tickets have moved to Github
The new ticket tracker is available at https://github.com/rails/rails/issues