OSDN Git Service

Fixed a bug that the server failed to start with a permission denied error.
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 4 Feb 2008 13:08:21 +0000 (13:08 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 4 Feb 2008 13:08:21 +0000 (13:08 +0000)
changelog
shogi-server
webserver

index 9fcded7..9252759 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,17 @@
+2008-02-04 Daigo Moriwaki <daigo at debian dot org>
+
+       * [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 <daigo at debian dot org>
 
        * [shogi-server]
index 3ab2267..5569a28 100755 (executable)
@@ -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
index 1458c15..d788000 100755 (executable)
--- 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