More info:<div><br></div><div>Running on Mac OS Snow Leopard, Erlang R15B or R15B01.</div><div><br></div><div>user_drv:start() is spawning user:start() and not 'tty -c -e'.<br clear="all"><div><br></div><div><br></div>
<span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="border-collapse:separate;font-family:arial;font-weight:normal"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></b></span><br>
<br><br><div class="gmail_quote">On Thu, Aug 9, 2012 at 2:07 PM, José Valim <span dir="ltr"><<a href="mailto:jose.valim@gmail.com" target="_blank">jose.valim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone,<div><br></div><div>If I run the following command:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="courier new, monospace">$ erl -noinput -s user_drv</font></div>
</blockquote><div><br></div>And then try to send any io message to the user process, the message appears skewed:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="courier new, monospace">1> io:format(user, "foo\nbar\nbaz", []).</font></div>
</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="courier new, monospace">foo</font></div></div></div><div><div><div><font face="courier new, monospace"> bar</font></div>
</div></div><div><div><div><font face="courier new, monospace"> bazok</font></div></div></div></blockquote><div><div><br clear="all"><div>However, sending the message to io makes it appear correctly:</div><div><br></div>
</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><div><font face="courier new, monospace">2> io:format(standard_io, "foo\nbar\nbaz", []). </font></div></div></div>
</div><div><div><div><font face="courier new, monospace">foo</font></div></div></div><div><div><div><font face="courier new, monospace">bar</font></div></div></div><div><div><div><font face="courier new, monospace">bazok</font></div>
</div></div></blockquote><div><div><br></div><div>This becomes a major problem when printing error logger messages to tty, which become completely unreadable.</div><div><br></div><div>I have found out this issue when starting an Elixir shell with user_drv.</div>
<div>The issue also appears with LFE and any other time user_drv is started manually.</div><div><br></div><div>Does anyone know a fix to this problem or how I could debug it further?</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="border-collapse:separate;font-family:arial;font-weight:normal"><div>
<span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></b></span><br>
</font></span></div>
</blockquote></div><br></div>