This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
stdio question
- To: libc hackers list <libc-hacker@gnu.org>
- Subject: stdio question
- From: Emmanuel Galanos <egalanos@cse.unsw.edu.au>
- Date: Sun, 6 Dec 1998 18:40:35 +1100 (EST)
- Reply-To: Emmanuel Galanos <egalanos@cse.unsw.edu.au>
Hi,
I was just wondering if glibc's behaviour is correct for the
following situation.
When using stdio, and after calling setvbuf() on the stream to
make it nonbuffered, if the stream is connected to a terminal then the
input will still be line buffered. Should the code perhaps do something
like:
setvbuf(..)
{
.
.
case _IONBF: /* Unbuffered. */
.
.
.
if ( isatty ( stream->_fileno ) ) {
/* clear ICANON flag from tty */
}
.
.
of course done in a way that fits in with glibc's structure (which
I don't know yet) and only for unix based OS's.
-eman