Module: kamailio
Branch: master
Commit: dd7854ea6f7efa6899bf59bb0d5069f0daf1def9
URL:
https://github.com/kamailio/kamailio/commit/dd7854ea6f7efa6899bf59bb0d5069f…
Author: Camille Oudot <camille.oudot(a)orange.com>
Committer: Camille Oudot <camille.oudot(a)orange.com>
Date: 2015-11-19T11:16:11+01:00
core: exit with failure code if a child dies
---
Modified: main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dd7854ea6f7efa6899bf59bb0d5069f…
Patch:
https://github.com/kamailio/kamailio/commit/dd7854ea6f7efa6899bf59bb0d5069f…
---
diff --git a/main.c b/main.c
index c9a6a12..94f64ff 100644
--- a/main.c
+++ b/main.c
@@ -755,7 +755,11 @@ void handle_sigs(void)
/* exit */
shutdown_children(SIGTERM, 1);
LM_DBG("terminating due to SIGCHLD\n");
- exit(0);
+ if (WIFSIGNALED(chld_status)) {
+ exit(1);
+ } else {
+ exit(0);
+ }
break;
case SIGHUP: /* ignoring it*/