From 24aaf5e7884fbecd439c841fdce98292e7c6429f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 13 Jan 2010 00:04:38 +0000 Subject: 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 --- util/prosodyctl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/prosodyctl.lua') 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 -- cgit v1.2.3