diff --git a/lib/elixir/lib/task/supervised.ex b/lib/elixir/lib/task/supervised.ex index 446acbda56b..54149a45fe6 100644 --- a/lib/elixir/lib/task/supervised.ex +++ b/lib/elixir/lib/task/supervised.ex @@ -162,7 +162,7 @@ defmodule Task.Supervised do ~c"** When function == ~p~n" ++ ~c"** arguments == ~p~n" ++ ~c"** Reason for termination == ~n" ++ ~c"** ~p~n" - terms = [name, fun, args, get_reason(reason)] + terms = [starter, fun, args, get_reason(reason)] {message, terms} = case process_label do @@ -173,7 +173,7 @@ defmodule Task.Supervised do message = ~c"** Task ~p terminating~n" ++ message - {message, [starter | terms]} + {message, [name | terms]} end defp get_from({node, pid_or_name, _pid}) when node == node(), do: pid_or_name diff --git a/lib/elixir/test/elixir/task_test.exs b/lib/elixir/test/elixir/task_test.exs index 08f98efce4a..1b5427543dc 100644 --- a/lib/elixir/test/elixir/task_test.exs +++ b/lib/elixir/test/elixir/task_test.exs @@ -1130,8 +1130,8 @@ defmodule TaskTest do send(pid, :go) receive do: ({:DOWN, ^ref, _, _, _} -> :ok) end) =~ ~r""" - \[error\] \*\* Task #PID<\d+\.\d+\.\d+> terminating - \*\* Started from #PID<\d+\.\d+\.\d+> + \[error\] \*\* Task #{inspect(pid)} terminating + \*\* Started from #{inspect(parent)} \*\* When function == &TaskTest.task/1 \*\* arguments == \[#PID<\d+\.\d+\.\d+>\] \*\* Reason for termination ==\s