From bb1c092330352a3a83b3b76f4e31a359ab4670af Mon Sep 17 00:00:00 2001 From: beatles Date: Fri, 4 Dec 2009 10:32:07 +0000 Subject: [PATCH] Took (a bit) care of Windows platforms. The HUP signal is not supported by Ruby on Windows. Now it is disabled on Windows. --- changelog | 4 ++++ shogi-server | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/changelog b/changelog index 2fec24f..9de6c6e 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +2009-12-04 Daigo Moriwaki + * [shogi-server] + - The HUP signal is not supported by Ruby on Windows. + 2009-11-11 Daigo Moriwaki * [mk_rate] diff --git a/shogi-server b/shogi-server index 3595fc3..e65c9f0 100755 --- a/shogi-server +++ b/shogi-server @@ -387,8 +387,10 @@ def main 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}]") -- 2.11.0