I made this patch to ensure kamailio exits with an unclean status if it stops due to a child exits. This allows systemd's unit `Restart=on-failure` parameter to actually automatically restart kamailio, in a segfault or any other signal-throwing situation.
The side effect is that it would trigger a kamailio restart if one of the children is stopped with a TERM signal, but I considered here that the only clean way to stop kamailio is to send a signal to the main attendant process, and not to a child. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/403
-- Commit Summary --
* core: exit with failure code if a child dies
-- File Changes --
M main.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/403.patch https://github.com/kamailio/kamailio/pull/403.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/403
Thanks! It can be merged.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/403#issuecomment-158028170
Merged #403.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/403#event-469052964
Btw, probably has to be backported as well ...
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/403#issuecomment-158029165