OSDN Git Service

Took (a bit) care of Windows platforms.
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Fri, 4 Dec 2009 10:32:07 +0000 (10:32 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Fri, 4 Dec 2009 10:32:07 +0000 (10:32 +0000)
The HUP signal is not supported by Ruby on Windows. Now it is disabled on Windows.

changelog
shogi-server

index 2fec24f..9de6c6e 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+2009-12-04 Daigo Moriwaki <daigo at debian dot org>
+       * [shogi-server]
+         - The HUP signal is not supported by Ruby on Windows.
+
 2009-11-11 Daigo Moriwaki <daigo at debian dot org>
 
        * [mk_rate]
 2009-11-11 Daigo Moriwaki <daigo at debian dot org>
 
        * [mk_rate]
index 3595fc3..e65c9f0 100755 (executable)
@@ -387,8 +387,10 @@ def main
       fg_thread.kill if fg_thread
     end
   end
       fg_thread.kill if fg_thread
     end
   end
-  trap("HUP") do
-    Dependencies.clear
+  unless (RUBY_PLATFORM.downcase =~ /mswin|mingw|cygwin|bccwin/)
+    trap("HUP") do
+      Dependencies.clear
+    end
   end
   $stderr.puts("server started as a deamon [Revision: #{ShogiServer::Revision}]") if $options["daemon"] 
   log_message("server started [Revision: #{ShogiServer::Revision}]")
   end
   $stderr.puts("server started as a deamon [Revision: #{ShogiServer::Revision}]") if $options["daemon"] 
   log_message("server started [Revision: #{ShogiServer::Revision}]")