-/* $OpenBSD: httpd.c,v 1.73 2022/09/02 07:38:14 benno Exp $ */
+/* $OpenBSD: httpd.c,v 1.74 2024/04/08 12:45:18 tobhe Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
proc_init(ps, procs, nitems(procs), debug, argc0, argv, proc_id);
log_procinit("parent");
- if (!debug && daemon(1, 0) == -1)
- err(1, "failed to daemonize");
if (ps->ps_noaction == 0)
log_info("startup");
-/* $OpenBSD: proc.c,v 1.43 2024/01/17 08:22:40 claudio Exp $ */
+/* $OpenBSD: proc.c,v 1.44 2024/04/08 12:45:18 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
privsep_process = PROC_PARENT;
proc_setup(ps, procs, nproc);
+ if (!debug && daemon(1, 0) == -1)
+ fatal("failed to daemonize");
+
/*
* Create the children sockets so we can use them
* to distribute the rest of the socketpair()s using