Browse files

Added graceful exit from pressing CTRL-C during the run of the rails …

…command #1150 [Caleb Tennis]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 10eb22c commit ca873648eab40d6ceb221c4d359c1f177fba0493 @dhh dhh committed May 21, 2005
Showing with 5 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +3 −1 railties/bin/rails
View
2 railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added graceful exit from pressing CTRL-C during the run of the rails command #1150 [Caleb Tennis]
+
* Allow graceful exits for dispatch.fcgi processes by sending a SIGUSR1. If the process is currently handling a request, the request will be allowed to complete and then will terminate itself. If a request is not being handled, the process is terminated immediately (via #exit). This basically works like restart graceful on Apache. [Jamis Buck]
* Made dispatch.fcgi more robust by catching fluke errors and retrying unless its a permanent condition. [Jamis Buck]
View
4 railties/bin/rails
@@ -1,6 +1,8 @@
abort "Rails requires Ruby 1.8.2" if RUBY_VERSION < "1.8.2"
+Signal.trap("INT") { puts; exit }
+
require File.dirname(__FILE__) + '/../lib/rails_generator'
require 'rails_generator/scripts/generate'
Rails::Generator::Base.use_application_sources!
-Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
+Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')

0 comments on commit ca87364

Please sign in to comment.