Use daemon(3) to daemonise rather than writing our own code. Since we
use the mode of daemon(3) which closes the standard 3 file descriptors,
if the user requests logging to one of those we dup(2) the original
first. We must also take care to always close any newly-opened file
descriptors before execve(2) of the child.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.