From c1e075ec38ec71a58eae6e34c08c0cc50269ba14 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') 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 -- cgit v1.2.3