summaryrefslogtreecommitdiff
path: root/common/dispatch.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2013-10-30 13:52:36 -0700
committerShawn Routhier <sar@isc.org>2013-10-30 13:52:36 -0700
commit47e8308dea6ee44ce19edf4fdf3331fa41a986f7 (patch)
treec2801fff3fff0639b504de72675ea62b0d1cab65 /common/dispatch.c
parent58cb5d861d6f412475722381723dc788c314c39f (diff)
downloadisc-dhcp-47e8308dea6ee44ce19edf4fdf3331fa41a986f7.tar.gz
[master]
[32692] Signal handlers added: sigint (ctrl-c) and sigterm (default kill)
Diffstat (limited to 'common/dispatch.c')
-rw-r--r--common/dispatch.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/common/dispatch.c b/common/dispatch.c
index 7c4434e7..976d37e2 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -3,7 +3,7 @@
Network input dispatcher... */
/*
- * Copyright (c) 2004-2011 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2011,2013 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -112,8 +112,15 @@ dispatch(void)
status = isc_app_ctxrun(dhcp_gbl_ctx.actx);
- log_fatal ("Dispatch routine failed: %s -- exiting",
- isc_result_totext (status));
+ /*
+ * isc_app_ctxrun can be stopped by receiving a signal. It will
+ * return ISC_R_SUCCESS in that case. That is a normal behavior.
+ */
+
+ if (status != ISC_R_SUCCESS) {
+ log_fatal ("Dispatch routine failed: %s -- exiting",
+ isc_result_totext (status));
+ }
}
void