Opened 15 years ago

Closed 15 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)

shutdown_select.c (1.1 KB ) - added by anevilyak 15 years ago.
3536.patch (590 bytes ) - added by titer 15 years ago.

Download all attachments as: .zip

Change History (5)

by anevilyak, 15 years ago

Attachment: shutdown_select.c added

comment:1 by titer, 15 years ago

Cc: eric.petit@… added

by titer, 15 years ago

Attachment: 3536.patch added

comment:2 by titer, 15 years ago

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.

comment:3 by bonefish, 15 years ago

Resolution: fixed
Status: newclosed

Thanks! Applied in hrev30846.

Note: See TracTickets for help on using tickets.