spawn: call startup notification hooks on time out
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ff46fd7e0a
commit
3abec42c81
10
spawn.c
10
spawn.c
|
@ -67,6 +67,16 @@ static void
|
|||
spawn_monitor_timeout(struct ev_loop *loop, ev_timer *w, int revents)
|
||||
{
|
||||
spawn_sequence_remove(w->data);
|
||||
/* send a timeout event to hook function */
|
||||
if(globalconf.hooks.startup_notification != LUA_REFNIL)
|
||||
{
|
||||
lua_createtable(globalconf.L, 0, 2);
|
||||
lua_pushstring(globalconf.L, sn_startup_sequence_get_id(w->data));
|
||||
lua_setfield(globalconf.L, -2, "id");
|
||||
lua_pushliteral(globalconf.L, "timedout");
|
||||
lua_setfield(globalconf.L, -2, "type");
|
||||
luaA_dofunction(globalconf.L, globalconf.hooks.startup_notification, 1, 0);
|
||||
}
|
||||
sn_startup_sequence_unref(w->data);
|
||||
p_delete(&w);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue