- Tells the supervisor SupRef to restart a child process
- corresponding to the child specification identified by
- Id. The child specification must exist and
- the corresponding child process must not be running.
- See start_child/2 for a description of
- SupRef.
- If the child specification identified by Id does not
- exist, the function returns {error,not_found}. If
- the child specification exists but the corresponding process
- is already running, the function returns
+
Tells the supervisor SupRef to restart
+ a child process corresponding to the child specification
+ identified by Id. The child
+ specification must exist and the corresponding child process
+ must not be running.
+ Note that for temporary children, the child specification
+ is automatically deleted when the child terminates, and thus
+ it is not possible to restart such children.
+ See start_child/2
+ for a description of SupRef.
+ If the child specification identified
+ by Id does not exist, the function
+ returns {error,not_found}. If the child specification
+ exists but the corresponding process is already running, the
+ function returns
{error,running}.
- If the child process start function returns {ok,Child}
- or {ok,Child,Info}, the pid is added to the supervisor
- and the function returns the same value.
+ If the child process start function
+ returns {ok,Child}
+ or {ok,Child,Info}, the pid
+ is added to the supervisor and the function returns the same
+ value.
If the child process start function returns ignore,
the pid remains set to undefined and the function
returns {ok,undefined}.
- If the child process start function returns an error tuple or
- an erroneous value, or if it fails, the function returns
- {error,Error} where Error is a term containing
+
If the child process start function returns an error tuple
+ or an erroneous value, or if it fails, the function returns
+ {error,Error}
+ where Error is a term containing
information about the error.
diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml
index a432f9458b..5b8fd604c8 100644
--- a/system/doc/design_principles/sup_princ.xml
+++ b/system/doc/design_principles/sup_princ.xml
@@ -160,10 +160,13 @@ init(...) ->
be restarted.