Message-Id: <199904191800.SAA66460@out4.ibm.net> From: "Mark E." To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Mon, 19 Apr 1999 14:01:15 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Bug no. 277 In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.01d) Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Could people who know their way around C++ in general, and libstdc++ and > iostreams in particular, please look at this bug and help me decide > whether this has something to do with core DJGPP? > After some debugging, I've come up with a sample program that illustrates what is going on: #include int main() { int ch; printf("Prompt 1: "); ch = getc(stdin); printf("\nPrompt 2: "); ch = getc(stdin); } Compile and run the program. At the first prompt, press ctrl-z. The second prompt is printed and the program immediately exits. This is because the eof flag in stdin has been set from the first getc, thus an EOF is returned without even checking the keyboard. Is it intentional that pressing ctrl-z disables all further keyboard input from functions like getc() that operate with a FILE pointer? --- Mark Elbrecht, snowball3 AT usa DOT net http://snowball.digitalspace.net/