summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2013-10-30 13:57:42 -0700
committerShawn Routhier <sar@isc.org>2013-10-30 13:57:42 -0700
commita351ccdc5bf66a80f063fdf2c4569c46812a6c2a (patch)
tree4d76b917161602609575097f4156c75abc435a14 /common
parent47c40d5687d3cd405028df73b922d78624a6e1f7 (diff)
downloadisc-dhcp-a351ccdc5bf66a80f063fdf2c4569c46812a6c2a.tar.gz
[v4_2]
[master] [32692] Signal handlers added: sigint (ctrl-c) and sigterm (default kill)
Diffstat (limited to 'common')
-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