[erlang-questions] Get grandchild pid when using nested supervisors?
Vance Shipley
vances@REDACTED
Tue Sep 30 07:06:24 CEST 2014
On Mon, Sep 29, 2014 at 9:40 PM, Roger Lipscombe <roger@REDACTED>
wrote:
>
> Calling supervisor:start_child(A, []) returns {ok, BPid}, where I
> really want WPid. What's a sensible way to get hold of it?
>
{ok, BPid} = supervisor:start_child(A, []),
[{_, WPid, _, _}] = supervisor:which_children(BPid)
--
-Vance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140930/c29ebba3/attachment.htm>
More information about the erlang-questions
mailing list