[ee122] Questions P2

Daniel Killebrew dank at eecs.berkeley.edu
Wed Sep 26 17:37:40 PDT 2007

Ofer Sadgat wrote:
> Sorry, the other question was: if you type: 
> http://www.google.com(CTRL+D) <http://www.google.com%28CTRL+D%29> do 
> you process the request then close or just close?

> A student asked about a problem where he is having to enter two ^D's
> to terminate the input.  One is captured in the buffer, then the other
> closes the program.

"I believe this is because the terminal driver turns a ^D into an EOF
only when it's at the beginning of a line."

"I don't think they should have to worry about abruptly terminated input,
other than not crashing." - Vern

So if you encounter CNTRL+D at the end of the line, do something 
reasonable: process it and close, or just close. Both are fine. Just 
don't crash.

> Thanks,
> Ofer
> ------------------------------------------------------------------------
> _______________________________________________
> ee122 mailing list
> ee122 at mailman.ICSI.Berkeley.EDU
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122

More information about the ee122 mailing list