tcp: char-read hang with EOT added by klm` on Mon Oct 15 20:16:19 2012


I'm on arch linux 64bit, 

[klm@kth store]$ csi -version

CHICKEN
(c)2008-2012 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.8.1 (rev e5ed396)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2012-09-30 on kth (Linux)


[klm@kth store]$ csi -R tcp -e "(define-values (in out) (tcp-accept (tcp-listen 4321))) (print 'reading) (print (char->integer (read-char in)))" 



In a different terminal, type:

$ echo "A" | nc localhost 4321

You should see 65 popping up on the hanging csi instance, all good. Now try this:

$ nc localhost 4321

and hit Ctrl-D which should generate EOT on most terminals. I expect to see 4 but it hangs. What am I doing wrong?