feat(spawn, lib: awful: spawn: with_line_callback): make callbacks optional
This commit is contained in:
parent
9fec4f71bc
commit
7546c236db
|
@ -123,8 +123,10 @@ function spawn.with_line_callback(cmd, callbacks)
|
||||||
done_before = true
|
done_before = true
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if done_callback then
|
||||||
done_callback()
|
done_callback()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if have_stdout then
|
if have_stdout then
|
||||||
spawn.read_lines(Gio.UnixInputStream.new(stdout, true),
|
spawn.read_lines(Gio.UnixInputStream.new(stdout, true),
|
||||||
stdout_callback, step_done, true)
|
stdout_callback, step_done, true)
|
||||||
|
|
2
spawn.c
2
spawn.c
|
@ -402,7 +402,7 @@ luaA_spawn(lua_State *L)
|
||||||
return_stdout = luaA_checkboolean(L, 4);
|
return_stdout = luaA_checkboolean(L, 4);
|
||||||
if(lua_gettop(L) >= 5)
|
if(lua_gettop(L) >= 5)
|
||||||
return_stderr = luaA_checkboolean(L, 5);
|
return_stderr = luaA_checkboolean(L, 5);
|
||||||
if(lua_gettop(L) >= 6)
|
if (!lua_isnoneornil(L, 6))
|
||||||
{
|
{
|
||||||
luaA_checkfunction(L, 6);
|
luaA_checkfunction(L, 6);
|
||||||
flags |= G_SPAWN_DO_NOT_REAP_CHILD;
|
flags |= G_SPAWN_DO_NOT_REAP_CHILD;
|
||||||
|
|
Loading…
Reference in New Issue