summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 19:55:06 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 19:55:06 +0000
commit18da18fcfb0dc3461055528b5311fa852e0bf27d (patch)
tree01a1ad5a990b00cbc06071aa1fe57617a3240014
parentb2c93b3dce364e3cd4d256ecda5f2ad03004dcbb (diff)
merge revision(s) 14071:
Merged 14070 from trunk. * lib/xmlrpc/server.rb (XMLRPC::Server#server): Improve signal handling so pressing control-c in the controlling terminal or sending SIGTERM stops the XML-RPC server. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@16964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/xmlrpc/server.rb6
-rw-r--r--version.h2
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d6c7ffb0e77..65347712493 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Jun 8 04:54:36 2008 James Edward Gray II <jeg2@ruby-lang.org>
+
+ Merged 14070 from trunk.
+
+ * lib/xmlrpc/server.rb (XMLRPC::Server#server): Improve signal handling so
+ pressing control-c in the controlling terminal or sending SIGTERM stops
+ the XML-RPC server.
+
Sun Jun 8 04:46:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (newline_node): set line from outermost node before removing
diff --git a/lib/xmlrpc/server.rb b/lib/xmlrpc/server.rb
index 7900a1d920f..5166d7619f8 100644
--- a/lib/xmlrpc/server.rb
+++ b/lib/xmlrpc/server.rb
@@ -639,11 +639,11 @@ class Server < WEBrickServlet
def serve
if RUBY_PLATFORM =~ /mingw|mswin32/
- signal = 1
+ signals = [1]
else
- signal = "HUP"
+ signals = %w[INT TERM HUP]
end
- trap(signal) { @server.shutdown }
+ signals.each { |signal| trap(signal) { @server.shutdown } }
@server.start
end
diff --git a/version.h b/version.h
index c54fb3be226..a0947d5c3a7 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-08"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080608
-#define RUBY_PATCHLEVEL 153
+#define RUBY_PATCHLEVEL 154
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8