Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Consider sendto$NOCANCEL on macOS to avoid EINTR #174

Open
Jarred-Sumner opened this issue Apr 5, 2022 · 0 comments
Open

Consider sendto$NOCANCEL on macOS to avoid EINTR #174

Jarred-Sumner opened this issue Apr 5, 2022 · 0 comments

Comments

@Jarred-Sumner
Copy link

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

This line:

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

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant