From 4ba9e6102b6ffbec574b6b6584b262cc3880fcde Mon Sep 17 00:00:00 2001 From: beatles Date: Mon, 4 Feb 2008 13:08:21 +0000 Subject: [PATCH] Fixed a bug that the server failed to start with a permission denied error. --- changelog | 14 ++++++++++++++ shogi-server | 1 + webserver | 1 + 3 files changed, 16 insertions(+) diff --git a/changelog b/changelog index 9fcded7..9252759 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,17 @@ +2008-02-04 Daigo Moriwaki + + * [shogi-server] + - In the daemon mode, if the specified directory was a relative + path, the server could fail to start with a permission denied + error. This issue has been fixed. The path is interpreted as + an absolute path before switching to daemon. + + * [webserver] + - In the daemon mode, if the specified directory was a relative + path, the server could fail to start with a permission denied + error. This issue has been fixed. The path is interpreted as + an absolute path before switching to daemon. + 2008-02-03 Daigo Moriwaki * [shogi-server] diff --git a/shogi-server b/shogi-server index 3ab2267..5569a28 100755 --- a/shogi-server +++ b/shogi-server @@ -2182,6 +2182,7 @@ def main write_pid_file($options["pid-file"]) if ($options["pid-file"]) dir = $options["daemon"] || nil + dir = File.expand_path(dir) if dir if dir && ! File.exist?(dir) FileUtils.mkdir(dir) end diff --git a/webserver b/webserver index 1458c15..d788000 100755 --- a/webserver +++ b/webserver @@ -120,6 +120,7 @@ def parse_command_line end dir = options["daemon"] || nil + dir = File.expand_path(dir) if dir if dir && ! File.exist?(dir) FileUtils.mkdir(dir) end -- 2.11.0