diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-01-13 00:04:38 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-01-13 00:04:38 +0000 |
commit | c1e075ec38ec71a58eae6e34c08c0cc50269ba14 (patch) | |
tree | 2228841690a45542407345ea43ffdb8f144d9fef | |
parent | 40216063d254b9d7fdf7d1ed3fc0c6b94ce85d03 (diff) | |
download | prosody-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
-rw-r--r-- | util/prosodyctl.lua | 2 |
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 |