diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c index 8a4283b7ee..1bbcaade23 100644 --- a/lib/isc/unix/app.c +++ b/lib/isc/unix/app.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: app.c,v 1.20 2000/07/11 19:18:05 bwelling Exp $ */ +/* $Id: app.c,v 1.21 2000/07/12 01:46:57 bwelling Exp $ */ #include @@ -154,17 +154,22 @@ isc_app_start(void) { * will not cause sigwait() to return. We may have inherited * unexpected actions for SIGHUP, SIGINT, and SIGTERM from our parent * process, * (e.g, Solaris cron). Set an action of SIG_DFL to make - * sure sigwait() works as expected. + * sure sigwait() works as expected. Only do this for SIGTERM and + * SIGINT if we don't have sigwait(), since a different handler is + * installed above. */ result = handle_signal(SIGHUP, SIG_DFL); if (result != ISC_R_SUCCESS) return (result); + +#ifdef HAVE_SIGWAIT result = handle_signal(SIGTERM, SIG_DFL); if (result != ISC_R_SUCCESS) return (result); result = handle_signal(SIGINT, SIG_DFL); if (result != ISC_R_SUCCESS) return (result); +#endif /* * Block SIGHUP, SIGINT, SIGTERM.