On 2018-04-28T11:36:35 +0100 Mark Raynsford via freebsd-virtualization <freebsd-virtualization@freebsd.org> wrote: > > Well that's two in favour of NFS. I have one small question: Is there > any way to stop nfsd from forking into the background? I run everything > on the system under process supervision (runit), and this is the first > time I've ever seen a daemon program with no option to stay in the > foreground. > > I can write a wrapper in C that starts up rpcbind and nfsd (the former > *does* have an option to stay in the foreground), but I'd rather not if > I don't have to.
I spent a while writing a wrapper[0] that keeps nfsd in the foreground and cleans up when it shuts down, only to discover that there's an entirely undocumented --debug flag[1] that does the same thing. [0] https://github.com/io7m/nfswrap-bsd [1] https://github.com/freebsd/freebsd/blame/master/usr.sbin/nfsd/nfsd.c#L105 -- Mark Raynsford | http://www.io7m.com
pgpsNnNYVX820.pgp
Description: OpenPGP digital signature