[erlang-questions] Output from programs started with open_port

Ulf Norell ulf.norell@REDACTED
Fri Feb 5 07:15:26 CET 2010


2010/2/3 Samuel Rivas <samuel.rivas@REDACTED>

> Hi,
>
> I have no idea about how to make it work for windows. For linux we had
> the carriage return problem also, but we just went practical and
> redirected the error outuput to a file and used tail -f in other
> terminal. Note that if you can't control the binaries you execute
> there is a chance that they output to stdio as well, confusing your
> port communication (I see you are using {packet, 1} which means that
> the process must write to stdio using a fixed protocol).

Indeed. I simplified my example to make it shorter. On unix systems I use
nouse_stdio to avoid this problem (that doesn't work on Windows though,
but that's a different issue).

Redirecting to a file is the workaround I'm using, but I was hoping someone
would know what the problem is and whether it can be fixed. :-)

/ Ulf


More information about the erlang-questions mailing list