aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-13 00:04:38 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-13 00:04:38 +0000
commitc1e075ec38ec71a58eae6e34c08c0cc50269ba14 (patch)
tree2228841690a45542407345ea43ffdb8f144d9fef /util/prosodyctl.lua
parent40216063d254b9d7fdf7d1ed3fc0c6b94ce85d03 (diff)
downloadprosody-c1e075ec38ec71a58eae6e34c08c0cc50269ba14.tar.gz
prosody-c1e075ec38ec71a58eae6e34c08c0cc50269ba14.zip
prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist 2) we have write access to lock it
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r--util/prosodyctl.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index dafc7118..0776fc76 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -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