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

[3.9] backport #8234 (sendfile fallback) #8270

Merged
merged 3 commits into from
Jul 25, 2023
Merged

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Jul 25, 2023

@emillon emillon mentioned this pull request Jul 25, 2023
7 tasks
What's happening here is:

- input and output files are open
- sendfile is attempted and fails
- both files are closed
- input file is opened again
- output file is opened again (but already exists)

This throws an error if the output file is not writable.

Signed-off-by: Etienne Millon <me@emillon.org>
This adds a layer of rebinding that obscures what is going on.

Signed-off-by: Etienne Millon <me@emillon.org>
Fixes ocaml#8210

If the `sendfile` branch failed, it leaves an empty target file, so
retrying will fail. Instead we reuse the fd directly.

Signed-off-by: Etienne Millon <me@emillon.org>
@emillon emillon merged commit ff44861 into ocaml:3.9 Jul 25, 2023
@emillon emillon deleted the backport-8234 branch July 25, 2023 14:32
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.

1 participant