Commit a79348a6 authored by Mark Andrews's avatar Mark Andrews
Browse files

1752. [port] Move isc_app_start() to after ns_os_daemonise()

                        as some fork() implementations unblock the signals
                        that are blocked by isc_app_start(). [RT #12810]
parent 575e5324
1752. [port] Move isc_app_start() to after ns_os_daemonise()
as some fork() implementations unblock the signals
that are blocked by isc_app_start(). [RT #12810]
1751. [bug] --enable-getifaddrs failed under linux. [RT #12867] 1751. [bug] --enable-getifaddrs failed under linux. [RT #12867]
1750. [port] lib/bind/make/rules.in:subdirs was not bash friendly. 1750. [port] lib/bind/make/rules.in:subdirs was not bash friendly.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: main.c,v 1.139 2004/09/01 07:23:51 marka Exp $ */ /* $Id: main.c,v 1.140 2004/10/25 00:33:28 marka Exp $ */
#include <config.h> #include <config.h>
...@@ -605,6 +605,15 @@ setup(void) { ...@@ -605,6 +605,15 @@ setup(void) {
if (!ns_g_foreground) if (!ns_g_foreground)
ns_os_daemonize(); ns_os_daemonize();
/*
* We call isc_app_start() here as some versions of FreeBSD's fork()
* destroys all the signal handling it sets up.
*/
result = isc_app_start();
if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("isc_app_start() failed: %s",
isc_result_totext(result));
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version, ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version,
saved_command_line); saved_command_line);
...@@ -801,11 +810,6 @@ main(int argc, char *argv[]) { ...@@ -801,11 +810,6 @@ main(int argc, char *argv[]) {
ns_os_init(program_name); ns_os_init(program_name);
result = isc_app_start();
if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("isc_app_start() failed: %s",
isc_result_totext(result));
dns_result_register(); dns_result_register();
dst_result_register(); dst_result_register();
isccc_result_register(); isccc_result_register();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment