Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Handle EINTR in usockets #12357

Merged
merged 8 commits into from
Jul 5, 2024
Merged

Handle EINTR in usockets #12357

merged 8 commits into from
Jul 5, 2024

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Jul 5, 2024

What does this PR do?

It seems that usockets wasn't handling EINTR. This fixes that and also makes some values return ssize_t instead of int. The caller might still truncate.

Hypothetical scenario where this matters:

  1. recv() returns EINTR in usockets
  2. usockets sees an error
  3. usockets closes the socket due to the error

This also uses epoll_pwait2, which allows using a higher resolution timer

How did you verify your code works?

Copy link
Contributor

github-actions bot commented Jul 5, 2024

@Jarred-Sumner, your commit has failing tests :(

🪟💻 4 failing tests Windows x64 baseline

  • test/cli/install/registry/bun-install-registry.test.ts 1 failing
  • test/cli/install/registry/bun-install-windowsshim.test.ts code 1
  • test/js/node/child_process/child_process.test.ts 1 failing
  • test/js/node/tls/node-tls-connect.test.ts 1 failing

🪟💻 4 failing tests Windows x64

  • test/cli/install/registry/bun-install-registry.test.ts 2 failing
  • test/cli/install/registry/bun-install-windowsshim.test.ts code 1
  • test/js/node/child_process/child_process.test.ts 1 failing
  • test/js/node/tls/node-tls-connect.test.ts 1 failing

View logs

@Jarred-Sumner Jarred-Sumner merged commit 71c223e into main Jul 5, 2024
50 of 52 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/eintr branch July 5, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants