in reply to Re: how to read STDIN interactively
in thread how to read STDIN interactively

No, not if STDIN is a terminal. Terminals automatically re-open, in effect. That's what you can rely on read functions to return EOF more than once, and why you sometimes have to signal EOF more than once to exit some applications.