Opened 16 years ago
Closed 16 years ago
#3536 closed bug (fixed)
select() for read hangs if run with no timeout on an AF_UNIX socket that has been shutdown and has no data remaining
Reported by: | anevilyak | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Kernel | Version: | R1/pre-alpha1 |
Keywords: | Cc: | eric.petit@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Attached please find a testcase. This has been verified as working as expected on OSX and/or Linux.
Attachments (2)
Change History (5)
by , 16 years ago
Attachment: | shutdown_select.c added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|
by , 16 years ago
Attachment: | 3536.patch added |
---|
comment:2 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
I attached a patch for the unix protocol add-on. It makes UnixEndpoint::Receivable() return ENOTCONN once all data has been read, if the other end shut down the connection. The testcase passes with this change.
The tcp protocol add-on seems to be working the same way, yet I am not certain this is the right way to fix it - comments are welcome.