summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-03-23 05:29:49 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-03-23 05:29:49 +0000
commit29fe91b6645ce8d7d7ef2568bee8834e1453a134 (patch)
treeef81a0d781ec399acd6d9049c437a4f6bb1bdf11 /sbin/iked
parent1ce3485cc04e74a61ec9e3553378c1971bdb859d (diff)
set ps_noaction to not fork uneeded children when checking config with -n
ok mikeb@ reyk@
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/iked.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c
index 246b861cc62..61079167c2a 100644
--- a/sbin/iked/iked.c
+++ b/sbin/iked/iked.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.c,v 1.33 2017/01/09 14:49:21 reyk Exp $ */
+/* $OpenBSD: iked.c,v 1.34 2017/03/23 05:29:48 jsg Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -142,6 +142,9 @@ main(int argc, char *argv[])
log_init(debug, LOG_DAEMON);
log_setverbose(verbose);
+ if (opts & IKED_OPT_NOACTION)
+ ps->ps_noaction = 1;
+
if (!debug && daemon(0, 0) == -1)
err(1, "failed to daemonize");