This adds a callback function which glib calls after it fork()'d and did all the
necessary setup. This callback function clears our signal mask.
This is necessary because libev 3.8 and later use signalfd and therefor have to
add those signals to the signal mask. Processes started through awesome would
inherit this signal mask and I can tell you, some app which ignores ctrl-c
confuses people a lot.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This adds a new function spawn_proc_helper() which just contains a copy of
g_spawn_command_line_async()'s source code. This means that there should be no
behavior change at all here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Lua can preallocate space in table for array or non-array elements type.
This should improve performance when setting table, so when we can we
use lua_createtable() since this is just a gain.
Signed-off-by: Julien Danjou <julien@danjou.info>
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>