mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Only install default handlers for SIGTERM and SIGWAIT if we haven't installed
other handlers already.
This commit is contained in:
parent
473cb90680
commit
a6f31a3fd0
@ -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 <config.h>
|
||||
|
||||
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user