[erlang-questions] Ruby and open_port

Michael Truog mjtruog@REDACTED
Fri May 18 22:34:32 CEST 2012


In CloudI (http://cloudi.org) that is done for you, so you can still receive stdout/stderr within the CloudI log.  Within the CloudI code, it is using an erlang port that does the pipe handling and erlectricity is probably not yet doing this.  The port code which is used in CloudI is part of GEPD (https://github.com/okeuday/generic-erlang-port--driver-) which makes it a bit simpler if you are using standard types for your port (and if you don't care about the dependency on Boost).

On 05/18/2012 09:43 AM, Tom Burdick wrote:
> Hello,
>
> I'm trying to use ruby as an erlang port using erlectricity which
> nicely uses nouse_stdio for the port (fd's 3 and 4).
>
> In Ruby 1.9.3 fd 3 at least is now reserved by the ruby vm. I don't
> want to use stdio if I can help it. Is there a nice way to setup a
> custom pipe using open_port? I see it can take {fd, In, Out} but I
> wasn't sure how I might set that up where it spawns and sets up a
> different pipe pair.
>
> Any help would be appreciated!
>
> Tom
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>




More information about the erlang-questions mailing list