This module is used to start processes adhering to
the
Some useful information is initialized when a process starts. The registered names, or the process identifiers, of the parent process, and the parent ancestors, are stored together with information about the function initially called in the process.
While in "plain Erlang" a process is said to terminate normally
only for the exit reason
When a process started using
The crash report contains the previously stored information such as ancestors and initial function, the termination reason, and information regarding other processes which terminate as a result of this process terminating.
See
Spawns a new process and initializes it as described above.
The process is spawned using the
Spawns a new process and initializes it as described above.
The process is spawned using the
Spawns a new process and initializes it as described above.
The process is spawned using the
Using the spawn option
Starts a new process synchronously. Spawns the process and
waits for it to start. When the process has started, it
must call
If the
If
The
Using the spawn option
This function must be used by a process that has been started by
a
The
If this function is not called, the start function will return an error tuple (if a link and/or a timeout is used) or hang otherwise.
The following example illustrates how this function and
-module(my_proc).
-export([start_link/0]).
-export([init/1]).
start_link() ->
proc_lib:start_link(my_proc, init, [self()]).
init(Parent) ->
case do_initialization() of
ok ->
proc_lib:init_ack(Parent, {ok, self()});
{error, Reason} ->
exit(Reason)
end,
loop().
...
Equivalent to
This function can be used by a user defined event handler to
format a crash report. The crash report is sent using
Extracts the initial call of a process that was started
using one of the spawn or start functions described above.
The list
If the process was spawned using a fun,
This function is used by the
Extracts the initial call of a process that was started
using one of the spawn or start functions described above,
and translates it to more useful information.
If the initial call is to one of the system defined behaviors
such as
A
By default,
This function does the same as (and does call) the BIF
Equivalent to
Orders the process to exit with the given
The function returns
If the call times out, a
If the process does not exist, a
The implementation of this function is based on the