What if you pipe a file into a go program? Does it get EOF then?
--
---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Can you try
echo foo > bar
go run main.go < bar
Or just
echo foo | go run main.go
Where main.go is your example programme.
Most of console application on windows which use msvcrt runtime libraries stop reading with CTRL-Z. ...
The code is wrong, I think.
I want your agreements that we'll change current behavior. ...
..., If I want to write cat program using io.Copy, we must handle keyboard event to handle EOF. ...
So windows terminal does not actually close the input stream when you
use ^Z, but sends the 0x1a char down the stream and the application at
the other end of it interprets it as EOF ? Surely this can't be true.
...
Before CL 7312053, it worked fine with ^Z. But after the changes, the behavior is changed. So I want to get back the older behavior.
Alex, why you don't want change?
... If you allow this approach, I'll change this patch to get CodePage in everytime.