<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Well that was interesting. What I had almost worked. The difference was:<div><br></div><div><span class="Apple-style-span" style="font-family: Monaco; font-size: 10px; "><span style="color: rgb(130, 42, 148); ">tcsetattr</span></span><span class="Apple-style-span" style="font-family: Monaco; font-size: 10px; "> </span><span class="Apple-style-span" style="font-family: Monaco; font-size: 10px; ">(STDIN_FILENO, TCSANOW, &newt);</span><br><div><div><br></div><div>versus</div><div><br></div><div><blockquote type="cite"><div> int fd = fileno(in);<br></div></blockquote><blockquote type="cite"><div> tcsetattr(fd, TCSANOW, &newt); <br></div></blockquote><br></div><div><br></div><div>STDIN_FILENO has a value of 0, whereas fileno(stdin) has a value of 9.</div><div><br></div><div>Thanks for all your help,</div><div>Andrei</div><div><br></div></div></div></body></html>