Changeset

7457:5e18416881bb

util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates successfully
author Kim Alvefur <zash@zash.se>
date Thu, 23 Jun 2016 21:07:48 +0200
parents 7455:82d8c11ab0cb
children 7458:82710f8c1fe6
files util/prosodyctl.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl.lua	Sun Jun 12 19:55:46 2016 +0200
+++ b/util/prosodyctl.lua	Thu Jun 23 21:07:48 2016 +0200
@@ -44,7 +44,7 @@
 local function getchar(n)
 	local stty_ret = os.execute("stty raw -echo 2>/dev/null");
 	local ok, char;
-	if stty_ret == 0 then
+	if stty_ret == true or stty_ret == 0 then
 		ok, char = pcall(io.read, n or 1);
 		os.execute("stty sane");
 	else