In addition to the existing 'start' and 'stop',
this commit adds 'respawn' and 'fail' events
to allow system monitors to detect and handle
unstable processes.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
in->srv->name, in->name, in->respawn_count, runtime);
in->restart = in->respawn = 0;
in->halt = 1;
+ service_event("instance.fail", in->srv->name, in->name);
} else {
+ service_event("instance.respawn", in->srv->name, in->name);
uloop_timeout_set(&in->timeout, in->respawn_timeout * 1000);
}
}