Software /
code /
prosody
Diff
util/prosodyctl.lua @ 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 |
parent | 7262:751a4832adb4 |
child | 8123:bd591c5fc1bf |
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