This program just dies on my windows or linux:
C:\Documents and Settings\brainman>\\sos\pub\test
a
line=[97 13 10]
err=<nil>
b
line=[98 13 10]
err=<nil>
ccccc^C
C:\Documents and Settings\brainman>
or
sos t2 # ./test
a
line=[97 10]
err=<nil>
b
line=[98 10]
err=<nil>
cccc^Csos t2 #
Maybe it is a coin toss if it gets to output to console before it
goes.
I think ReadBytes talks here about something completely different (not
Ctrl+C), but if EOF arrives before DELIMETER:
C:\TMP>type alex.txt
aaaa
bbb
ccc
C:\TMP>type alex.txt | \\sos\pub\test
line=[97 97 97 97 13 10]
err=<nil>
line=[98 98 98 13 10]
err=<nil>
line=[99 99 99]
err=EOF
C:\TMP>
or
sos t2 # cat a
aaaa
bbbb
ccccsos t2 # cat a | ./test
line=[97 97 97 97 10]
err=<nil>
line=[98 98 98 98 10]
err=<nil>
line=[99 99 99 99]
err=EOF
sos t2 #
Alex