Opened 9 months ago

Closed 9 months ago

#18548 closed bug (fixed)

recv(2) with AF_UNIX blocks upon empty receive buffer; MSG_DONTWAIT ignored

Reported by: kohlschuetter Owned by: axeld
Priority: critical Milestone: R1/beta5
Component: Network & Internet/UDP Version: R1/beta4
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by korli)

When receiving datagrams via AF_UNIX, a buffer-empty condition prevents "recv" from returning immediately with an error when MSG_DONTWAIT is set.

This prevents code relying on these features from working as expected.

A workaround is to define a receive timeout on the socket, however that may be brittle when receiving an existing socket via file descriptors, for example.

Related to #18539

Attachments (1)

recvtest.c (870 bytes ) - added by kohlschuetter 9 months ago.
Example code demonstrating the bug

Download all attachments as: .zip

Change History (4)

by kohlschuetter, 9 months ago

Attachment: recvtest.c added

Example code demonstrating the bug

comment:1 by korli, 9 months ago

Description: modified (diff)
Summary: recv(2) with AF_UNIX blocks upon empty receive buffer; MSG_NOWAIT ignoredrecv(2) with AF_UNIX blocks upon empty receive buffer; MSG_DONTWAIT ignored

comment:3 by waddlesplash, 9 months ago

Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: newclosed

Merged in hrev57207.

Note: See TracTickets for help on using tickets.