Opened 15 months ago

Last modified 15 months ago

#18548 closed bug

recv(2) with AF_UNIX blocks upon empty receive buffer; MSG_NOWAIT ignored — at Initial Version

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

When receiving datagrams via AF_UNIX, a buffer-empty condition prevents "recv" from returning immediately with an error when MSG_NOWAIT 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

Change History (1)

by kohlschuetter, 15 months ago

Attachment: recvtest.c added

Example code demonstrating the bug

Note: See TracTickets for help on using tickets.