Re: MI testsuite to use PTY for inferior

Daniel Jacobowitz
2005-08-01T20:52:47Z

On Mon, Aug 01, 2005 at 11:45:03PM +0300, Eli Zaretskii wrote:
> Seriously, though: buffering and other aspects of I/O relevant to
> terminals can be fixed by suitable calls to termios or similar
> functions.
>
> In addition, a file handle redirected to the pipe vis-a-vis a FE
> doesn't necessarily need to be line buffered.

FWIW, this bit is a real problem. Not necessarily a big problem, but
definitely a real problem.

You can't fix it via termios; it isn't a property of the terminal (and
we don't have a terminal, anyway). It's set by the application startup
code based on the result of isatty() on fd 0, usually - at least both
mingw32 and GNU/Linux do it this way.

The default for non-terminals is block buffered, which if you're
waiting for output is really annoying.

--
Daniel Jacobowitz
CodeSourcery, LLC