1 diff -urN bind-9.4.1.org/bin/named/main.c bind-9.4.1/bin/named/main.c
2 --- bind-9.4.1.org/bin/named/main.c 2007-06-01 19:44:51.223203000 +0200
3 +++ bind-9.4.1/bin/named/main.c 2007-06-01 20:08:19.703753086 +0200
9 -create_managers(void) {
10 - isc_result_t result;
11 +static void fill_ns_g_cpus() {
12 #ifdef ISC_PLATFORM_USETHREADS
13 unsigned int cpus_detected;
16 cpus_detected = isc_os_ncpus();
18 ns_g_cpus = cpus_detected;
19 - isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
20 - ISC_LOG_INFO, "found %u CPU%s, using %u worker thread%s",
21 - cpus_detected, cpus_detected == 1 ? "" : "s",
22 - ns_g_cpus, ns_g_cpus == 1 ? "" : "s");
29 +create_managers(void) {
30 + isc_result_t result;
32 +#ifdef ISC_PLATFORM_USETHREADS
33 + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
34 + ISC_LOG_INFO, "using %u worker thread%s",
35 + ns_g_cpus, ns_g_cpus == 1 ? "" : "s");
37 result = isc_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, &ns_g_taskmgr);
38 if (result != ISC_R_SUCCESS) {
39 UNEXPECTED_ERROR(__FILE__, __LINE__,
41 isc_mem_free(ns_g_mctx, instance);
42 #endif /* HAVE_LIBSCF */
44 + /* Fill in ns_g_cpus date before chroot happens */
49 * Initialize system's random device as fallback entropy source