Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: [Windows] Any way to distinguish ^C Induced EOF from ^Z EOF? Date: Sun, 11 Mar 2012 23:23:49 +0100 Organization: albasani.net Lines: 23 Message-ID: References: <4f5d18ef$0$291$14726298@news.sunsite.dk> <4f5d239d$0$293$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net Ou5AwjpBpC+Slk/dhN0rGaTPUWtHrKBc8EfTQqxwH1ZXHSHbNIq5JyOq8y7G7pkY1j2HjWM1IIG/S0DZtFTspQjAXKJ9JbAVqm1PLvlc7m8XduIWzkHkQekiaKYSSESv NNTP-Posting-Date: Sun, 11 Mar 2012 22:23:49 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="6UsEzedBm2CFAPqjm7kAudMpYfDzFQpZqK/jzeWMsDGjsPCNaUoWj3b43aErNQax8XcqogLkz1hYOlaxkXX14io8QAhaOoDv5EvpcZNDSgHRhhr2BkpwfA8azYSj/YrE"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2 In-Reply-To: <4f5d239d$0$293$14726298@news.sunsite.dk> Cancel-Lock: sha1:A2gDD9JR45kHF0GMb8os0Ky+y9c= Xref: csiph.com comp.lang.java.programmer:12882 Arne Vajhøj schrieb: > > But Java was not designed to provide that type of > fine control over terminal IO. This Java is just a *frigging cheap RI* implementation, that doesn't work correctly for console streams, although it could. It doesn't map the File metaphor correctly to the console streams. The Java developers were not reading the MS specs, and just doing a cheap hack. The native readBytes must anyway check GetLastError and eventually throw IOException. With some additional logic and a re-read everything would be fine. But I agree, the scope is a little bit enlarged, since it is a behaviour that can only be observed during Signals, which is also a little bit out of scope of standard java. Bye