aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
authorJames Fish <[email protected]>2015-03-04 23:10:25 +0000
committerZandra Hird <[email protected]>2015-05-26 12:27:15 +0200
commit000c33662b8a98870a97a3499076895d4e832563 (patch)
tree011cccbc70aaf650c153c3eb7ffbf6ac3a944b9b /lib/stdlib/doc
parent4034b89a07a97766dba5e6213b1eb4d76ba6df9e (diff)
downloadotp-000c33662b8a98870a97a3499076895d4e832563.tar.gz
otp-000c33662b8a98870a97a3499076895d4e832563.tar.bz2
otp-000c33662b8a98870a97a3499076895d4e832563.zip
Don't store child that returns ignore in simple supervisor
If a child of a simple_one_for_one returns ignore from its start function no longer store the child for any restart type. It is not possible to restart or delete the child because the supervisor is a simple_one_for_one. Previously a simple_one_for_one would crash, potentially without shutting down all of its children, when it tried to shutdown a child with undefined pid. Previous only one undefined pid child was stored in a simple_one_for_one supervisor no matter how many times the child start function returned ignore.
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/supervisor.xml12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index ffac1c0bd7..6ff477a42d 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -386,9 +386,15 @@
added to the supervisor and the function returns the same
value.</p>
<p>If the child process start function returns <c>ignore</c>,
- the child specification is added to the supervisor, the pid
- is set to <c>undefined</c>, and the function returns
- <c>{ok,undefined}</c>.</p>
+ the child specification is added to the supervisor (unless the
+ supervisor is a <c>simple_one_for_one</c> supervisor, see below),
+ the pid is set to <c>undefined</c> and the function returns
+ <c>{ok,undefined}</c>.
+ </p>
+ <p>In the case of a <c>simple_one_for_one</c> supervisor, when a child
+ process start function returns <c>ignore</c> the functions returns
+ <c>{ok,undefined}</c> and no child is added to the supervisor.
+ </p>
<p>If the child process start function returns an error tuple or
an erroneous value, or if it fails, the child specification is
discarded, and the function returns <c>{error,Error}</c> where