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 exit reason
When a process that is started using
The crash report contains the previously stored information, such as ancestors and initial function, the termination reason, and information about other processes that terminate as a result of this process terminating.
See
See
Equivalent to
This function can be used by a user-defined event handler to
format a crash report. The crash report is sent using
This function can be used by a user-defined event handler to
format a crash report. When
This function does the same as (and does call) the
Always use this function instead of the BIF for processes started
using
This function must be used by a process that has been started by
a
Function
If this function is not called, the start function returns an error tuple (if a link and/or a time-out 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().
...
Extracts the initial call of a process that was started
using one of the spawn or start functions in this module.
The list
If the process was spawned using a fun,
Spawns a new process and initializes it as described in the
beginning of this manual page. The process is spawned using the
Spawns a new process and initializes it as described in the
beginning of this manual page. The process is spawned using the
Spawns a new process and initializes it as described in the
beginning of this manual page. The process is spawned using the
Using 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 function
If
Argument
Using spawn option
Equivalent to
Orders the process to exit with the specified
Returns
If the call times out, a
If the process does not exist, a
The implementation of this function is based on the
This function is used by functions
This function extracts the initial call of a process that was
started using one of the spawn or start functions in this module,
and translates it to more useful information.
If the initial call is to one of the system-defined behaviors
such as
A
By default,