Module: kamailio Branch: master Commit: 54774017325fe2e24ee7c5d64b343ad0097c8332 URL: https://github.com/kamailio/kamailio/commit/54774017325fe2e24ee7c5d64b343ad0097c8332
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2018-02-27T11:03:27+01:00 core: main - use fprintf() if daemon_status_send() fails at shut down - avoid race with syslog() when processes are killed - reported by GH #1454 --- Modified: src/main.c --- Diff: https://github.com/kamailio/kamailio/commit/54774017325fe2e24ee7c5d64b343ad0097c8332.diff Patch: https://github.com/kamailio/kamailio/commit/54774017325fe2e24ee7c5d64b343ad0097c8332.patch --- diff --git a/src/main.c b/src/main.c index 83d63bcfc1..9366884ac7 100644 --- a/src/main.c +++ b/src/main.c @@ -2633,8 +2633,7 @@ int main(int argc, char** argv) /* fix routing lists */ if ( (r=fix_rls())!=0){ - fprintf(stderr, "ERROR: error %d while trying to fix configuration\n", - r); + fprintf(stderr, "error %d while trying to fix configuration\n", r); goto error; }; fixup_complete=1; @@ -2650,7 +2649,7 @@ int main(int argc, char** argv) if (is_main) shutdown_children(SIGTERM, 0); if (!dont_daemonize) { if (daemon_status_send(0) < 0) - ERR("error sending exit status: %s [%d]\n", + fprintf(stderr, "error sending exit status: %s [%d]\n", strerror(errno), errno); } /* else terminate process */ @@ -2661,7 +2660,7 @@ int main(int argc, char** argv) if (is_main) shutdown_children(SIGTERM, 0); if (!dont_daemonize) { if (daemon_status_send((char)-1) < 0) - ERR("error sending exit status: %s [%d]\n", + fprintf(stderr, "error sending exit status: %s [%d]\n", strerror(errno), errno); } return -1; _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev