aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/supervisor.xml
diff options
context:
space:
mode:
authorChristopher Faulet <[email protected]>2011-09-05 12:42:33 +0200
committerHenrik Nord <[email protected]>2011-09-16 14:54:44 +0200
commit47759479146ca11ad81eca0bb3236b265e20601d (patch)
treedebf184d6518c4737a9d91867d1923d78c38d977 /lib/stdlib/doc/src/supervisor.xml
parent6a113a60dba9fd6c4d736b9e56c52f3494a15027 (diff)
downloadotp-47759479146ca11ad81eca0bb3236b265e20601d.tar.gz
otp-47759479146ca11ad81eca0bb3236b265e20601d.tar.bz2
otp-47759479146ca11ad81eca0bb3236b265e20601d.zip
Explicitly kill dynamic children in supervisors
According to the supervisor's documentation: "Important note on simple-one-for-one supervisors: The dynamically created child processes of a simple-one-for-one supervisor are not explicitly killed, regardless of shutdown strategy, but are expected to terminate when the supervisor does (that is, when an exit signal from the parent process is received)." All is fine as long as we stop simple_one_for_one supervisor manually. Dynamic children catch the exit signal from the supervisor and leave. But, if this happens when we stop an application, after the top supervisor has stopped, the application master kills all remaining processes associated to this application. So, dynamic children that trap exit signals can be killed during their cleanup (here we mean inside terminate/2). This is unpredictable and highly time-dependent. In this commit, supervisor module is patched to explicitly terminate dynamic children accordingly to the shutdown strategy. NOTE: Order in which dynamic children are stopped is not defined. In fact, this is "almost" done at the same time.
Diffstat (limited to 'lib/stdlib/doc/src/supervisor.xml')
-rw-r--r--lib/stdlib/doc/src/supervisor.xml6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index edd119d37a..b4e81aba1f 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -171,12 +171,6 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
<p>If the child process is another supervisor, <c>Shutdown</c>
should be set to <c>infinity</c> to give the subtree ample
time to shutdown.</p>
- <p><em>Important note on simple-one-for-one supervisors:</em>
- The dynamically created child processes of a
- simple-one-for-one supervisor are not explicitly killed,
- regardless of shutdown strategy, but are expected to terminate
- when the supervisor does (that is, when an exit signal from
- the parent process is received).</p>
<p>Note that all child processes implemented using the standard
OTP behavior modules automatically adhere to the shutdown
protocol.</p>