WIP: Crashes?!?
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a15ef443b0
commit
919865eb5b
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue