YUKI Hiroshi
null+****@clear*****
Fri Jul 18 18:05:49 JST 2014
YUKI Hiroshi 2014-07-18 18:05:49 +0900 (Fri, 18 Jul 2014) New Revision: 45c49c880f059a88f62ce7d60fbb285d2c5bac27 https://github.com/droonga/droonga-engine/commit/45c49c880f059a88f62ce7d60fbb285d2c5bac27 Message: Output PID file safely Modified files: bin/droonga-engine-data-publisher lib/droonga/command/serf_event_handler.rb Modified: bin/droonga-engine-data-publisher (+1 -2) =================================================================== --- bin/droonga-engine-data-publisher 2014-07-18 17:25:41 +0900 (38d270d) +++ bin/droonga-engine-data-publisher 2014-07-18 18:05:49 +0900 (c8c5ab4) @@ -56,8 +56,7 @@ published_file = Pathname(options.published_file).expand_path FileUtils.copy(published_file.to_s, published_dir + published_file.basename) server = HTTPServer.new(:Port => options.port, - :DocumentRoot => published_dir, - :ServerType => WEBrick::Daemon) + :DocumentRoot => published_dir) trap("INT", "TERM") do server.shutdown Modified: lib/droonga/command/serf_event_handler.rb (+2 -1) =================================================================== --- lib/droonga/command/serf_event_handler.rb 2014-07-18 17:25:41 +0900 (5b6a64d) +++ lib/droonga/command/serf_event_handler.rb 2014-07-18 18:05:49 +0900 (279b921) @@ -189,11 +189,12 @@ module Droonga "--published-file", Path.catalog.to_s ] pid = spawn(env, *publisher_command_line) + Process.detach(pid) published_dir = Path.published(port) pid_file = published_dir + ".pid" - File.open(pid_file, "w") do |file| + File.open(pid_file.to_s, "w") do |file| file.puts(pid) end end -------------- next part -------------- HTML����������������������������...Download