Date: Sun, 18 Apr 1999 13:53:37 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: DJ Delorie cc: djgpp-workers AT delorie DOT com, "Mark E." Subject: Termios and getchar Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com It turns out that the termios hook is not called if the program uses buffered stdio functions like `getc' and `getchar'. DJ, is this intentional, or simply an oversight? It seems like the call to the hook was left inside `read' and `write' when we pushed the CR-LF -> NL conversion into the higher level, leaving `_filbuf' and `_flsbuf' to call `_read' and `_write' directly, even for text files. Mark, does this mean that Bash never uses any buffered stdio functions, only `read' and `write' for its interactive I/O? Otherwise, I don't understand how does the new port manage to invoke termios. Anyway, this seems like a bug that should be corrected. The simplest way is to call the hook inside `_flsbuf' and `_filbuf'.