aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-22 13:17:35 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-22 13:17:35 +0000
commit78c6de9daf7970ae40d50899ee0ceb67c0297a94 (patch)
tree1d8f812ef6c8a0715cc3b35036b16d6d9dba76b1
parentebf2b12b07641cbdf07218d2661a721ebab6092f (diff)
downloadrails-78c6de9daf7970ae40d50899ee0ceb67c0297a94.tar.gz
rails-78c6de9daf7970ae40d50899ee0ceb67c0297a94.tar.bz2
rails-78c6de9daf7970ae40d50899ee0ceb67c0297a94.zip
Fixed CTRL-C exists from the Breakpointer to be a clean affair without error dumping [Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@246 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/breakpoint_client.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 38f4cb1928..8d5c089558 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed CTRL-C exists from the Breakpointer to be a clean affair without error dumping [Kent Sibilev]
+
* Fixed "rake stats" to work with sub-directories in models and controllers and to report the code to test ration [Scott Baron]
* Added that Active Record associations are now reloaded instead of cleared to work with the new const_missing hook in Active Record.
diff --git a/railties/lib/breakpoint_client.rb b/railties/lib/breakpoint_client.rb
index 8a8bc75594..fa93c11f3e 100644
--- a/railties/lib/breakpoint_client.rb
+++ b/railties/lib/breakpoint_client.rb
@@ -62,6 +62,10 @@ end
options[:ServerURI] = ARGV[0] if ARGV[0]
+$running = true
+
+trap("INT"){$running = false}
+
puts "Waiting for initial breakpoint..."
loop do
@@ -138,7 +142,7 @@ loop do
puts "Connection established. Waiting for breakpoint...", "" if options[:Verbose]
- loop do
+ while $running
begin
service.ping
rescue DRb::DRbConnError => error
@@ -152,6 +156,7 @@ loop do
service.unregister_handler
end
rescue Exception => error
+ break unless $running
if options[:RetryDelay] > 0 then
puts "No connection to breakpoint service at #{options[:ServerURI]}:", " (#{error.inspect})" if options[:Verbose]
error.backtrace if $DEBUG