Blame SOURCES/dhcp-handle_ctx_signals.patch

324fcf
diff --git a/omapip/isclib.c b/omapip/isclib.c
324fcf
index 9ec1a0f..42d82ff 100644
324fcf
--- a/omapip/isclib.c
324fcf
+++ b/omapip/isclib.c
324fcf
@@ -185,16 +185,6 @@ dhcp_context_create(int flags,
324fcf
 		if (result != ISC_R_SUCCESS)
324fcf
 			goto cleanup;
324fcf
 
324fcf
-		result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
324fcf
-		if (result != ISC_R_SUCCESS)
324fcf
-			return (result);
324fcf
-		dhcp_gbl_ctx.actx_started = ISC_TRUE;
324fcf
-
324fcf
-		/* Not all OSs support suppressing SIGPIPE through socket
324fcf
-		 * options, so set the sigal action to be ignore.  This allows
324fcf
-		 * broken connections to fail gracefully with EPIPE on writes */
324fcf
-		handle_signal(SIGPIPE, SIG_IGN);
324fcf
-
324fcf
 		result = isc_taskmgr_createinctx(dhcp_gbl_ctx.mctx,
324fcf
 						 dhcp_gbl_ctx.actx,
324fcf
 						 1, 0,
324fcf
@@ -217,6 +207,21 @@ dhcp_context_create(int flags,
324fcf
 		result = isc_task_create(dhcp_gbl_ctx.taskmgr, 0, &dhcp_gbl_ctx.task);
324fcf
 		if (result != ISC_R_SUCCESS)
324fcf
 			goto cleanup;
324fcf
+
324fcf
+		result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
324fcf
+		if (result != ISC_R_SUCCESS)
324fcf
+			return (result);
324fcf
+		dhcp_gbl_ctx.actx_started = ISC_TRUE;
324fcf
+
324fcf
+		/* Not all OSs support suppressing SIGPIPE through socket
324fcf
+		 * options, so set the sigal action to be ignore.  This allows
324fcf
+		 * broken connections to fail gracefully with EPIPE on writes */
324fcf
+		handle_signal(SIGPIPE, SIG_IGN);
324fcf
+
324fcf
+		/* Reset handlers installed by isc_app_ctxstart()
324fcf
+		 * to default for control-c and kill */
324fcf
+		handle_signal(SIGINT, SIG_DFL);
324fcf
+		handle_signal(SIGTERM, SIG_DFL);
324fcf
 	}
324fcf
 
324fcf
 #if defined (NSUPDATE)
324fcf