[erlang-questions] Re: Chain two spawned processes

Rapsey <>
Sun Oct 18 18:10:26 CEST 2009


Erlang ports are designed to work with stdout/stdin for programs. I know
ffmpeg works just fine with stdout/stdin, don't know about x264 though. You
open a port to ffmpeg and x264 read from one, send to other.
Though I would be careful about doing it this way. I used to use open_port
for spawning mencoder, but switched to using a simple c program for it. The
reason was that my servers kept crashing every few days (with mencoder
running 24/7) and it had something to do with that port I had open
constantly (it made no difference how much data I was sending through, just
that it was open). Erlang for some reason tried to reserve a large amount of
memory, failed and crashed.


Sergej

On Sun, Oct 18, 2009 at 3:15 PM, Max Lapshin <> wrote:

> Oh, it seems, that sys.c:1395 makes pipe for spawned process
> input-output, so what I need,
> is to get fd for output of first open_port and pass it as input for
> second open_port call.
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list