On Wed, Jan 29, 2020 at 09:46:10AM +0000, Kevin Chadwick wrote:
> On 2020-01-27 19:13, Patrick Kristiansen wrote:
> > Is there something like the FreeBSD daemon(8) command for OpenBSD, which
> > can run a process in the background and restart it if it crashes?
>
> Of course init does this for getty but as others have pointed out, restarting
> daemons listening to the network during unexpected occurrences, like the
> kernel
> killing it during exploitation is a terrible default. I hear it in GoLang all
> the time and it irks me. I am against panic handling in Go generally but
> perhaps
> there will be some occasion where it may be of some use for semi-unexpected
> issues (perhaps hw redundancy, though generally that is better handled by
> having
> redundant complete systems).
>
> You can always use monit from pkg/ports for anything you have decided is an
> exception but it is good that OpenBSD makes people stop and think and maybe
> fix
> first.
>
I understand the security issues involved and I *completely* agree
with all who posted on them above.
Having said that, I'll add that the complete source code from the
FreeBSD daemon(8) program is on any FreeBSD system that has source
code package installed at:
your-freebsd-system.your-domain.your-tld:/usr/src/usr.sbin/daemon
free for you to grab. It should therefore be trivial to get FreeBSD's
daemon(8) onto your OpenBSD box by grabbing the source from a FreeBSD
box and building it on your OpenBSD system.
I would emphasize that this is only the best option if, you're most
comfortable with daemon(8) as opposed to something from OpenBSD's
pkg/ports tree, and you can build it from source. Otherwise you'd be
better off installing one of the many ports/packages designed to
manage and restart daemons mentioned above.
--
Chris
__o "All I was trying to do was get home from work."
_`\<,_ -Rosa Parks
___(*)/_(*)_____________________________________________________________
Christopher Sean Hilton [chris/at/vindaloo/dot/com]