title: Shell in ncurses window?
body: <p>I'm currently attempting to write a minimal terminal multiplexer using ncurses. However, when I try to <code>execv</code> a shell, it doesn't print to the window, and instead starts a new subprocess that takes control of the window (i.e. ignores ncurses).</p>
  
  <p>How can I prevent that and have ncurses control it? Is there some way of getting the tty and controlling that?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks to Ross Ridge in the comments, I now know that I need to create a pseudo-terminal, which I then read into an ncurses window. However, I can't figure out how to get the stdout to print in an ncurses window. Is there an ncurses function that reads file descriptors? Or do I have to use <code>read()</code> with <code>printw()</code> somehow?</p>