Skip to content

Auto-port 5.0: Kqueue: sendfile EINTR doesn't advance offset — data duplication#16553

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-16544-to-5.0
Mar 27, 2026
Merged

Auto-port 5.0: Kqueue: sendfile EINTR doesn't advance offset — data duplication#16553
chrisvest merged 1 commit into
5.0from
auto-port-pr-16544-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16544 to 5.0
Cherry-picked commit: 55a27f5


Motivation:

BSD/macOS sendfile passes the offset by value (unlike Linux which takes off_t*).
When interrupted (EINTR), sbytes reports how many bytes were sent before the signal.

Modifications:

  • Advance off so the next iteration resumes from where we left off, not from the start.

Result:

Fix possible data corruption when using sendfile and EINTR is observed

)

Motivation:

BSD/macOS sendfile passes the offset by value (unlike Linux which takes
off_t*).
When interrupted (EINTR), sbytes reports how many bytes were sent before
the signal.

Modifications:

- Advance off so the next iteration resumes from where we left off, not
from the start.

Result:

Fix possible data corruption when using sendfile and EINTR is observed

(cherry picked from commit 55a27f5)
@chrisvest chrisvest added this to the 5.0.0.Final milestone Mar 26, 2026
@chrisvest chrisvest enabled auto-merge (squash) March 27, 2026 00:19
@chrisvest chrisvest merged commit 79a2492 into 5.0 Mar 27, 2026
21 of 23 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16544-to-5.0 branch March 27, 2026 01:14
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.

3 participants