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 dafc7118e725b360a6a854e7eeb0d15f09aed0ad..0776fc76e825f44b7f53015c067e5c966d502eb5 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