[erlang-questions] crazy thoughts: inittab and erl node

Alex Arnon alex.arnon@REDACTED
Tue May 8 00:59:00 CEST 2007

On 5/8/07, Jim Thompson <jim@REDACTED> wrote:
> Alex Arnon wrote:
> > Unix's init cannot be trivially replaced, as it spawns several critical
> > kernel threads, and manages runlevels as well.
> untrue.  Many embedded systems use /bin/sh as a replacement for init,
> and, in fact, on linux (at least) you can pass "init=/bin/sh" to the
> kernel, and init won't be invoked at all, you'll be left at a
> rudimentary '#' prompt, and will need to check/mount non-root
> filesystems, etc.
> The runlevels stuff is just you telling init what to do, plus a bit of
> processing to interpret things like 'power is failing'.
> Having "init" start kernel threads would involve init loading modules
> into the kernel, (see: http://www.scs.ch/~frey/linux/kernelthreads.html)
> No such thing happens (on an otherwise 'stock' system, anyway.)
> But you are correct, that starting an erlang system from a boot script
> is likely the 'right thing', though if you've got two (or more) erlang
> "processes" protecting each other, you might have a difficult time
> killing them on shutdown.
> Jim
Indeed, 'init' is replaceable, and runlevels are a kind of convenience
(which some Unix-like systems, such as some of the BSDs, do without). The
kernel threads I was speaking of are usually privileged processes such as
the swapper/pager, which are different between systems. On embedded systems
with no HD, of course, these can be discarded as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070508/f006b635/attachment.htm>

More information about the erlang-questions mailing list