[erlang-questions] Running a Unix Subprocess

Jesper Louis Andersen <>
Tue Sep 27 20:01:04 CEST 2016

My advice is to use Serge Aleynikov's "erlexec" for this:


It is built for exactly the purpose of handling "bad UNIX processes" in a
way which makes them somewhat more in alignment with what Erlang provides.
In particular, you can receive monitor-like events if the external process
dies. It also handles the close-down of UNIX processes, should the Erlang
system die. And so on. In short, it solves a lot of problems you would have
to solve yourself otherwise.

On Tue, Sep 27, 2016 at 11:19 AM, Zachary Kessin <> wrote:

> Hi all
> I want to run a sub process that will connect via StdIn and StdOut. Is
> there an easy way to do this? I had thought to use a port but as the child
> process was not written with the assumption that it is running inside a
> port i don't want to have to prepend length bytes onto the inputs and
> outputs.
> Is there an easy way to do this in erlang?
> --
> Zach Kessin
> SquareTarget <http://squaretarget.rocks?utm_source=email-sig>
> Twitter: @zkessin <https://twitter.com/zkessin>
> Skype: zachkessin
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160927/5a38a4f1/attachment.html>

More information about the erlang-questions mailing list