projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
feb99f6
)
util.prosodyctl: Handle os.execute in Lua 5.2 returning true when command terminates...
author
Kim Alvefur
<zash@zash.se>
Thu, 23 Jun 2016 19:07:48 +0000
(21:07 +0200)
committer
Kim Alvefur
<zash@zash.se>
Thu, 23 Jun 2016 19:07:48 +0000
(21:07 +0200)
util/prosodyctl.lua
patch
|
blob
|
history
diff --git
a/util/prosodyctl.lua
b/util/prosodyctl.lua
index cde1cdd4ce7b839d07648835c2948eeaf25dbcd7..7c9a3c19dcf7c0edb6ab95959627d197a429cb45 100644
(file)
--- a/
util/prosodyctl.lua
+++ b/
util/prosodyctl.lua
@@
-44,7
+44,7
@@
end
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