eof

monarch_dodra monarchdodra at gmail.com
Mon Jun 24 15:02:48 PDT 2013


On Monday, 24 June 2013 at 21:13:31 UTC, bearophile wrote:
>>> I am very confused that ctrl+z didn't teminate the input of 
>>> console,it result in a dead loop.
>>
>> I think this is a library bug, I noticed it some times, but I 
>> didn't file it. Maybe it's worth filing in Bugzilla.
>
> I have added this bug report, is this the issue you are 
> seeing/having?
>
> http://d.puremagic.com/issues/show_bug.cgi?id=10467
>
> Bye,
> bearophile

I don't think this is a bug (I replied on the bug report): 
terminating the stream doesn't mean terminating the program, and 
if the program doesn't know how to handle a closed/eof/error'd 
stdin, it will just loop...

This FAQ link explains it pretty well for C++, which is pretty 
much the same thing as in D:
http://www.parashift.com/c++-faq/stream-input-failure.html
(the next few points are relevant too).

We could argue the design isn't optimal, yes, but it's not bugged.


More information about the Digitalmars-d-learn mailing list