summaryrefslogtreecommitdiff
path: root/omapip
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2016-10-06 10:14:10 +0200
committerFrancis Dupont <fdupont@isc.org>2016-10-06 10:14:10 +0200
commita1eea2a0d14c25d395d45ffb215df3d81a5b1da1 (patch)
treed663f5dfa97f4757ffd8dd5d1aa67c1d4a4e9fa0 /omapip
parent160842b2a7ecf1851f829b0ee7e1b36a8a3c6650 (diff)
parenta18e41ff5e07727c87f02a8aa88e4e59bfbac5f6 (diff)
downloadisc-dhcp-a1eea2a0d14c25d395d45ffb215df3d81a5b1da1.tar.gz
Merged rt43246a (fix --enable-threads)
Diffstat (limited to 'omapip')
-rw-r--r--omapip/isclib.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/omapip/isclib.c b/omapip/isclib.c
index 12608a7b..781db848 100644
--- a/omapip/isclib.c
+++ b/omapip/isclib.c
@@ -185,21 +185,6 @@ dhcp_context_create(int flags,
if (result != ISC_R_SUCCESS)
goto cleanup;
- result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
- if (result != ISC_R_SUCCESS)
- return (result);
- dhcp_gbl_ctx.actx_started = ISC_TRUE;
-
- /* Not all OSs support suppressing SIGPIPE through socket
- * options, so set the sigal action to be ignore. This allows
- * broken connections to fail gracefully with EPIPE on writes */
- handle_signal(SIGPIPE, SIG_IGN);
-
- /* Reset handlers installed by isc_app_ctxstart()
- * to default for control-c and kill */
- handle_signal(SIGINT, SIG_DFL);
- handle_signal(SIGTERM, SIG_DFL);
-
result = isc_taskmgr_createinctx(dhcp_gbl_ctx.mctx,
dhcp_gbl_ctx.actx,
1, 0,
@@ -222,6 +207,21 @@ dhcp_context_create(int flags,
result = isc_task_create(dhcp_gbl_ctx.taskmgr, 0, &dhcp_gbl_ctx.task);
if (result != ISC_R_SUCCESS)
goto cleanup;
+
+ result = isc_app_ctxstart(dhcp_gbl_ctx.actx);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ dhcp_gbl_ctx.actx_started = ISC_TRUE;
+
+ /* Not all OSs support suppressing SIGPIPE through socket
+ * options, so set the sigal action to be ignore. This allows
+ * broken connections to fail gracefully with EPIPE on writes */
+ handle_signal(SIGPIPE, SIG_IGN);
+
+ /* Reset handlers installed by isc_app_ctxstart()
+ * to default for control-c and kill */
+ handle_signal(SIGINT, SIG_DFL);
+ handle_signal(SIGTERM, SIG_DFL);
}
#if defined (NSUPDATE)