uSockets icon indicating copy to clipboard operation
uSockets copied to clipboard

Consider `sendto$NOCANCEL` on macOS to avoid EINTR

Open Jarred-Sumner opened this issue 3 years ago • 0 comments
trafficstars

darwin has a number of i/o functions that won't return EINTR

This line: https://github.com/uNetworking/uSockets/blob/eab7df550a7ebc631e2adcff8b7364481661e879/src/bsd.c#L67

Could be:

        int ret = sendto$NOCANCEL(fd, packet_buffer->buf[i], packet_buffer->len[i], flags, (struct sockaddr *)&packet_buffer->addr[i], sizeof(struct sockaddr_in));

Though a macro might be nice here so it is less ugly

There are several of these

recvfrom$NOCANCEL
sendto$NOCANCEL
fcntl$NOCANCEL
sendmsg$NOCANCEL
recvmsg$NOCANCEL
connect$NOCANCEL
accept$NOCANCEL
accept4$NOCANCEL
open$NOCANCEL
close$NOCANCEL

Jarred-Sumner avatar Apr 05 '22 13:04 Jarred-Sumner