-/* $OpenBSD: proc.c,v 1.23 2024/02/20 21:40:37 dv Exp $ */
+/* $OpenBSD: proc.c,v 1.24 2024/04/08 12:48:26 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: vmd.c,v 1.155 2024/02/05 21:58:09 dv Exp $ */
+/* $OpenBSD: vmd.c,v 1.156 2024/04/08 12:48:26 tobhe Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
proc_init(ps, procs, nitems(procs), env->vmd_debug, argc0, argv,
proc_id);
- if (!env->vmd_debug && daemon(0, 0) == -1)
- fatal("can't daemonize");
-
if (ps->ps_noaction == 0)
log_info("startup");