From b122f0719fbbbf44bc842c06a9e2c0c0d692550b Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 22 Jan 2000 01:40:10 +0000 Subject: [PATCH] basic reload support --- bin/named/main.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bin/named/main.c b/bin/named/main.c index 98598af48f..08d8f72d1c 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -282,12 +282,27 @@ main(int argc, char *argv[]) { setup(); /* - * Start things running and then wait for a shutdown request. + * Start things running and then wait for a shutdown request + * or reload. */ - result = isc_app_run(); - if (result != ISC_R_SUCCESS) - UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_app_run(): %s", - isc_result_totext(result)); + do { + result = isc_app_run(); + + if (result == ISC_R_RELOAD) { + /* + * XXXRTH Replace this with something useful. + */ + printf("reload requested\n"); + } else if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "isc_app_run(): %s", + isc_result_totext(result)); + /* + * Force exit. + */ + result = ISC_R_SUCCESS; + } + } while (result != ISC_R_SUCCESS); cleanup();