This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/15430] Cannot interrupt blocking I/O calls with close()
- From: "daney at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 9 Nov 2005 17:46:32 -0000
- Subject: [Bug libgcj/15430] Cannot interrupt blocking I/O calls with close()
- References: <bug-15430-6651@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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