prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist...
authorMatthew Wild <mwild1@gmail.com>
Wed, 13 Jan 2010 00:04:38 +0000 (00:04 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 13 Jan 2010 00:04:38 +0000 (00:04 +0000)
util/prosodyctl.lua

index 4d2c68ee59ef248132be40b1acfa062e5d05b834..7ce6c513bc61c0f682d2b022c55e983f28c7a2f9 100644 (file)
@@ -65,7 +65,7 @@ function getpid()
                return false, "no-pidfile";
        end
        
-       local file, err = io.open(pidfile, "w");
+       local file, err = io.open(pidfile, "r+");
        if not file then
                return false, "pidfile-read-failed", err;
        end