Software /
code /
prosody
Changeset
2796:1e287badd033
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
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 13 Jan 2010 00:04:38 +0000 |
parents | 2795:d6fcd13c07e7 |
children | 2797:76777fee99b7 |
files | util/prosodyctl.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl.lua Wed Jan 13 00:03:22 2010 +0000 +++ b/util/prosodyctl.lua Wed Jan 13 00:04:38 2010 +0000 @@ -65,7 +65,7 @@ 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