Windows fd_driver performs unconditional CR translation

Daniel Goertzen daniel.goertzen@REDACTED
Wed Aug 11 17:00:33 CEST 2010


On Windows, ports that operate on file descriptors, ie open_port(
{fd,0,1}...), will perform unconditional carriage return mangling.

I want to run erlang as a child process, and I want to perform unmangled IO
with it via stdin/stdout.  Currently this is impossible due to CR mangling.

The DF_XLAT_CR flag is assigned unconditionally in
erts/emulator/sys/win32/sys.c fd_start().

A solution might be to add an option, say "nomangle", to open_port
(erts/emulator/beam/erl_bif_port.c), and then have fd_start() examine that
option to enable or disable DF_XLAT_CR.


Dan.


More information about the erlang-bugs mailing list