Bartek Krawczyk wrote: > is there any program in base which allows to daemonize programs which don't > detach from console, don't have any "-daemon" option etc.? There are > sysutils/daemond and sysutils/daemonize in pkgsrc of course but do we have > anything like "daemon" in FreeBSD base? > > As a workaround I'm using "&" from /bin/sh at the moment.
What starts the program? If it is started from a daemon then that should be enough. If this is started from a terminal though... I am sure you already know all about the issues. I know you area asking about base so I will avoid all of the possible suggestions one might add outside of base. But let me ask a question. Is it practical for you to install an additional small program to meet this need? Because what you are looking for is the functionality of https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/plain/sys-utils/setsid.c compiled and installed. If you can install one small program then you would be set. Bob