12.2 Process Creation

A process is created by calling spawn:

  1. spawn(Module, Name, Args) -> pid()
  2. Module = Name = atom()
  3. Args = [Arg1,...,ArgN]
  4. ArgI = term()

spawn creates a new process and returns the pid.

The new process starts executing in Module:Name(Arg1,…,ArgN) where the arguments are the elements of the (possible empty) Args argument list.

There exist a number of other spawn BIFs, for example, spawn/4 for spawning a process at another node.