-/* $OpenBSD: proc.c,v 1.30 2024/01/16 13:33:12 claudio Exp $ */
+/* $OpenBSD: proc.c,v 1.31 2024/04/08 13:18:54 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
privsep_process = PROC_PARENT;
proc_setup(ps, procs, nproc);
+ if (!debug && daemon(0, 0) == -1)
+ fatal("failed to daemonize");
+
/*
* Create the children sockets so we can use them
* to distribute the rest of the socketpair()s using
-/* $OpenBSD: snmpd.c,v 1.50 2023/12/22 13:04:30 martijn Exp $ */
+/* $OpenBSD: snmpd.c,v 1.51 2024/04/08 13:18:54 tobhe Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
env->sc_engine_boots = 0;
proc_init(ps, procs, nitems(procs), debug, argc0, argv0, proc_id);
- if (!debug && daemon(0, 0) == -1)
- err(1, "failed to daemonize");
log_procinit("parent");
log_info("startup");