On Wed, Apr 30, 2014 at 12:02 AM, Ben Dibell <thinkingrod...@gmail.com> wrote: > Hi, I've tried other resources, even reading the source for init, but I > can't seem to locate the magic that makes /sbin/init the approved init. > I'm porting my init system Epoch to BSD for personal reasons, and I'd like > it to work under OpenBSD, which I've been enjoying as of late. I come from > the linux world where init=/bin/sh is perfectly valid,
Hmm, I haven't tried, but /bin/sh should work. > so some aspects are > probably simpler in Linux. I am hoping there is a concise and clean > explanation as to how to write/port an init system to BSD. Is it signal > trickery? A checksum burned into the kernel? I'm lost. I'm given "init has > died, signal 0 exit 0" or something nearly identical to this. This means the original thread of process 1 exited. Are you by chance trying to write a threaded init, because there are a number of places where the kernel currently assumes pid 1 is not a threaded process. Philip Guenther