This question already has an answer here:
The questioner didn't understand my answer, so a moderator deleted it. I've since edited by answer to connect the final pair of dots and make it crystal clear, but it is still deleted. Can it be undeleted?
The question can be seen at Why do I have to press Ctrl+D twice to close stdin? .
None of the earlier answers got it completely right, and the questioner seems to believe that nobody has really answered his question