[erlang-questions] spawn_link/{2,4} implementation?

Lukas Larsson lukas@REDACTED
Mon Nov 14 09:57:51 CET 2016


Hello,

On Mon, Nov 14, 2016 at 5:04 AM, Benoit Chesneau <bchesneau@REDACTED>
wrote:

>
> Got a little further this morning, I see in the erlang bif, that it does a
> `gen_server:call` to `{net_kernel, Node}` and then in net_kernel, spawn a
> process, and link to the original pid. But I'm trying to understand how the
> 'EXIT' is relayed, what is the logic behind?
>

Most of the distribution mechanisms are handled seamlessly by the Erlang
VM. It uses the protocol described here:
http://erlang.org/doc/apps/erts/erl_dist_protocol.html to communicate in
between nodes. The remote erlang:link/1 call and the resulting EXIT signal
is sent and received through that protocol.

Lukas


>
> My original intention was to add it to teleport once the handshake is
> improved:
> https://gitlab.com/barrel-db/teleport
>
> so I can have an option to spawn a process on a remote node via tcp
> connection and link it. Any idea is welcome.
>
> Benoit
>
>
> On Sun, Nov 13, 2016 at 10:43 AM Benoit Chesneau <bchesneau@REDACTED>
> wrote:
>
>> Is there any documentation that describes how spawning a a process on a
>> remote node is implemented? Which part of the code is responsible of it?
>>
>>
>> I am wondering how the link between 2 processes on 2 different nodes is
>> implemented, if there is some PING mechanism or such, ...
>>
>> Benoît
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161114/5cf31cac/attachment.htm>


More information about the erlang-questions mailing list