Ports communication through IPC

49 views
Skip to first unread message

Willian Frantz

unread,
Jan 2, 2023, 3:37:54 PM1/2/23
to elixir-lang-core
Just realized that BEAM supports communication with external processes using Named Pipes through Ports.

```
terminal> mkfifo name.pipe
iex> pid = Port.open('name.pipe', [:eof])
iex> Port.command(pid, "Sending data through a pipe to whoever is listening to...\n")
```

I was testing and trying to understand whether this could be a reliable feature for IPC.

But didn't found any docs about this, both Erlang and Elixir only states the tuples as first arguments with :spawn, :spawn_driver, :spawn_executable and :fd.

Is there a reason for this to be unknown? maybe future plans for deprecation or something... If that's not the case I would like to work on some docs for it.

José Valim

unread,
Jan 3, 2023, 4:20:09 AM1/3/23
to elixir-l...@googlegroups.com
IIRC it is a relatively recent features. You should reach out to the Erlang team on erlangforum.com.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/51b553f5-64d9-4f48-81e3-d2960d975ef8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages