title: Redirect VxWorks Serial Input
body: <p>I am trying to redirect all serial data to a process in VxWorks. Using the following code</p>
  
  <pre><code>fd = open("/tyCo/0", O_RDWR,0);
  ioctl(fd, FIOSETOPTIONS, OPT_TERMINAL &amp; ~OPT_7_BIT);
  read(fd, line, 100);
  </code></pre>
  
  <p>gives the correct input, except the first character entered is not populated, but is printed to the terminal. So if I enter "Hello", "H" is printed out and line="ello". If I don't enter anything and hit the return key, I get a prompt from the VxWorks Shell.</p>
  
  <p>I think that the VxWorks Shell is intercepting the first letter of the data. My guess is that I have to redirect STDIO to the new process only, but all the <a href="https://stackoverflow.com/questions/106453/how-do-i-redirect-tornado-vxworks-shell-output">documentation</a> I've found on that says to use ioGlobalStdSet() which is unavailable in VxWorks 6.4 RTP. How can I either redirect STDIO or kill the VxWorks Shell from my process?</p>