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

xsendfile error checking #487

Open
dlegaultbbry opened this issue Apr 3, 2024 · 0 comments
Open

xsendfile error checking #487

dlegaultbbry opened this issue Apr 3, 2024 · 0 comments

Comments

@dlegaultbbry
Copy link

I've noticed that commands like cp, for example, will fail silently when they encounter an error such as ENOSPC on a filesystem.

I've added and tested adding a simple addition equivalent of if (len == -1) perror_exit("write error"); in xsendfile to trap the error and re-ran the full test suite and haven't noticed any glaring issues and it does fix that cp problem.

I also noticed tar was using sendfile_len directly instead of xsendfile_len. Not sure if this is an issue in practice.

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

No branches or pull requests

1 participant