aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/supervisor.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-10-28 12:11:45 +0200
committerSiri Hansen <[email protected]>2011-10-28 12:11:45 +0200
commit01f80e8454e03a14f63152eb5f2d2696a4ec824d (patch)
tree47a14ddcebe19da68bbc8e6ed7771f8eef8e7726 /lib/stdlib/src/supervisor.erl
parent3e294fdb901018a0f3926a11ffe20a19b9494d79 (diff)
downloadotp-01f80e8454e03a14f63152eb5f2d2696a4ec824d.tar.gz
otp-01f80e8454e03a14f63152eb5f2d2696a4ec824d.tar.bz2
otp-01f80e8454e03a14f63152eb5f2d2696a4ec824d.zip
Handle undefined pid when reporting error from supervisor
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r--lib/stdlib/src/supervisor.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index f20ea18fd0..2dd5ccce7a 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -1238,15 +1238,15 @@ report_error(Error, Reason, Child, SupName) ->
error_logger:error_report(supervisor_report, ErrorMsg).
-extract_child(Child) when is_pid(Child#child.pid) ->
- [{pid, Child#child.pid},
+extract_child(Child) when is_list(Child#child.pid) ->
+ [{nb_children, length(Child#child.pid)},
{name, Child#child.name},
{mfargs, Child#child.mfargs},
{restart_type, Child#child.restart_type},
{shutdown, Child#child.shutdown},
{child_type, Child#child.child_type}];
extract_child(Child) ->
- [{nb_children, length(Child#child.pid)},
+ [{pid, Child#child.pid},
{name, Child#child.name},
{mfargs, Child#child.mfargs},
{restart_type, Child#child.restart_type},