[erlang-questions] Issues with stdin on ports

David Welton davidnwelton@REDACTED
Wed Jul 31 10:10:53 CEST 2013


> I unfortunately have not been able to use Erlang for most of what I've
> been doing lately because of a long standing issue with Erlang ports
> that I'd like to start a discussion about here.
>
> As far as I am aware, ports are generally the only option for creating
> and communicating with external processes in Erlang.

You might look into erlexec: https://github.com/saleyn/erlexec

It currently does not handle the communication part of things that you
need, but on the other hand, it's very hackable, the author is
friendly, and responds quickly to new ideas, so it probably would not
be that hard to add what you need to it.  And it is an external
program itself, so even if it's compiled code, you don't run the risk
of crashing your Erlang process by using it.

Erlang's handling of external programs leaves something to be desired
compared to other languages:

* You can't kill them.

* You can't treat stdin and stderr as separate streams.

Are two important ones that come to mind.

-- 
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/



More information about the erlang-questions mailing list