[Bug libgcj/15430] Cannot interrupt blocking I/O calls with close()

daney at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Nov 9 17:46:00 GMT 2005



------- Comment #5 from daney at gcc dot gnu dot org  2005-11-09 17:46 -------
Created an attachment (id=10189)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10189&action=view)
Program that demonstrates how shutdown can solve the problem.

Compile socktest.c thusly:

gcc -g -o soctest soctest.c -lpthread

Then run it and from a different window telnet localhost 4455

Do not type anything in the telnet window.

When the socket is shutdown the read returns with a value of zero.

I guess we should shutdown as well as close in the socket code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15430



More information about the Java-prs mailing list