How Erlang Starts
When Erlang starts, it reads a boot file and executes the
commands that it finds in the boot file. Eight Erlang modules
are preloaded. These are Erlang modules that have been compiled
into C and linked into the Erlang virtual machine. These eight
modules are responsible for booting the system. They include
init.erl
, which reads and evaluates commands in the
boot file, and erl_prim_loader
, which knows how to load
code into the system.
The boot file contains a binary that was created by calling
term_to_binary(Script)
, where Script
is a tuple
containing a boot script.
We’re going to make a new boot file called see.boot
and
a script called see
, which launches a program using the new boot file. The boot file will load a small ...
Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.