<div dir="ltr"><div>My advice is to use Serge Aleynikov's "erlexec" for this:<br><br><a href="https://github.com/saleyn/erlexec">https://github.com/saleyn/erlexec</a><br><br></div>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.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 27, 2016 at 11:19 AM, Zachary Kessin <span dir="ltr"><<a href="mailto:zkessin@gmail.com" target="_blank">zkessin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi all<br><br></div>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. <br><br></div>Is there an easy way to do this in erlang? <br clear="all"><span class="HOEnZb"><font color="#888888"><div><div><div><br>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Zach Kessin</div><div><a href="http://squaretarget.rocks?utm_source=email-sig" target="_blank">SquareTarget</a></div><div><span style="font-size:12.8px">Twitter: </span><a href="https://twitter.com/zkessin" style="font-size:12.8px" target="_blank">@zkessin</a><br></div><div>Skype: zachkessin<br></div></div></div></div></div></div></div>
</div></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">J.</div>
</div>