From c2b6342cb57df5925acbacff0aea74358c9a5ffb Mon Sep 17 00:00:00 2001
From: Tomas Pihl
Date: Sun, 22 Jul 2012 13:01:43 +0200
Subject: Have supervisor send errors up the chain
If a child fails to start, supervisor relies upon error_logger which does not
work when IO is inhibited. Instead pass the error up the chain and let someone
else use a proper Reason for any possible printouts.
---
lib/stdlib/doc/src/supervisor.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib/stdlib/doc/src')
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index f9a5e245b4..1a64b7a2af 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -295,7 +295,7 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
terminates with reason Term.
If any child process start function fails or returns an error
tuple or an erroneous value, the function returns
- {error,shutdown} and the supervisor terminates all
+ {error, {shutdown, Reason}} and the supervisor terminates all
started child processes and then itself with reason
shutdown.
--
cgit v1.2.3
From 102adf32f766dceee6f277c34111fbe9b8971647 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Thu, 11 Oct 2012 11:07:29 +0200
Subject: Fix documentation about how supervisor handles crash in child's start
function
---
lib/stdlib/doc/src/supervisor.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'lib/stdlib/doc/src')
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index 1a64b7a2af..9021d02ade 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -294,10 +294,10 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
is a term with information about the error, and the supervisor
terminates with reason Term.
If any child process start function fails or returns an error
- tuple or an erroneous value, the function returns
- {error, {shutdown, Reason}} and the supervisor terminates all
- started child processes and then itself with reason
- shutdown.
+ tuple or an erroneous value, the supervisor will first terminate
+ all already started child processes with reason shutdown
+ and then terminate itself and return
+ {error, {shutdown, Reason}}.
--
cgit v1.2.3