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
commit24aaf5e7884fbecd439c841fdce98292e7c6429f (patch)
tree891da656a4fb535779de4ea086f3f0f603b315ae /util/prosodyctl.lua
parent275444ab8281377a6711f99d806bdc09bb907299 (diff)
downloadprosody-24aaf5e7884fbecd439c841fdce98292e7c6429f.tar.gz
prosody-24aaf5e7884fbecd439c841fdce98292e7c6429f.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 4d2c68ee..7ce6c513 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