Message-Id: <199709082300.TAA01560@delorie.com> From: Oberhumer Markus Subject: Re: stdin + binmode (yet another one ;-) To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Tue, 9 Sep 1997 00:54:23 +0200 (METDST) Cc: k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at, djgpp-workers AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Sep 4, 97 08:42:34 pm Return-Read-To: markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk > I'm not saying I oppose your suggestion too strongly, but let me just > be the Devil's advocate here, so this issue doesn't look too one-sided, > OK? Binary mode IO is used for 2 different purposes: A) disabling the translation of textmode characters (CR/NL etc.) B) talking to devices in "raw" mode For some reason B) was introduced in 2.01 as a default when opening stdin. There was probably not much discussion at this time... > Don't forget that termios is with us only beginning with last 2.01 > beta releases, and it is incomplete, whereas the Ctrl-C disable was > there in v2 from day one. You will need to convert all programs that > want to see Ctrl-C to termios before you could remove that. If you want to disable Ctrl-C you should have to make an explicit call to termios or use signal(SIGINT,SIG_IGN) - this is completly portable. Doing this automatically as side-effect of open() and setmode() is just different from all systems I know - and I think it's wrong.