[sr-dev] git:master:dd7854ea: core: exit with failure code if a child dies
Camille Oudot
camille.oudot at orange.com
Thu Nov 19 12:26:28 CET 2015
Module: kamailio
Branch: master
Commit: dd7854ea6f7efa6899bf59bb0d5069f0daf1def9
URL: https://github.com/kamailio/kamailio/commit/dd7854ea6f7efa6899bf59bb0d5069f0daf1def9
Author: Camille Oudot <camille.oudot at orange.com>
Committer: Camille Oudot <camille.oudot at 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/dd7854ea6f7efa6899bf59bb0d5069f0daf1def9.diff
Patch: https://github.com/kamailio/kamailio/commit/dd7854ea6f7efa6899bf59bb0d5069f0daf1def9.patch
---
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*/
More information about the sr-dev
mailing list