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

unix: refactor uv__fs_copyfile() logic #14

Merged
merged 1 commit into from
Oct 31, 2019
Merged

unix: refactor uv__fs_copyfile() logic #14

merged 1 commit into from
Oct 31, 2019

Conversation

sthagen
Copy link
Owner

@sthagen sthagen commented Oct 31, 2019

The Unix/macOS uv__fs_copyfile() implementation falls back to
using uv_fs_sendfile(). This commit refactors the error handling
to use the sendfile() req's result field, which is an ssize_t
instead of using the return value, which is an int. The int
value was coming back as a negative number for some large files.

Refs: nodejs/node#30085
PR-URL: libuv#2533
Reviewed-By: Santiago Gimeno [email protected]
Reviewed-By: Saúl Ibarra Corretgé [email protected]
Reviewed-By: Richard Lau [email protected]

The Unix/macOS uv__fs_copyfile() implementation falls back to
using uv_fs_sendfile(). This commit refactors the error handling
to use the sendfile() req's result field, which is an ssize_t
instead of using the return value, which is an int. The int
value was coming back as a negative number for some large files.

Refs: nodejs/node#30085
PR-URL: #2533
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
@sthagen sthagen merged commit 1d7be33 into sthagen:v1.x Oct 31, 2019
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