WIP: Crashes?!?

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-01-02 15:17:36 +01:00
parent a15ef443b0
commit 919865eb5b
2 changed files with 9 additions and 0 deletions

View File

@ -396,6 +396,11 @@ local function read_stream(stream, line_callback, done_callback, close)
end
end
local r = read_stream
local function read_stream(...)
protected_call(r, ...)
end
--- Read lines from a Gio input stream
-- @tparam Gio.InputStream input_stream The input stream to read from.
-- @tparam function line_callback Function that is called with each line

View File

@ -41,6 +41,10 @@ local function read_input(stream)
open_window(class, title, snid)
end
end
local r = read_input
local function read_input(stream)
print(pcall(function() r(stream) end))
end
-- Read lines from stdin and handle them
local stdin = Gio.UnixInputStream.new(0, false)