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

RecorderThread: Copy files using sendfile syscall #149

Merged
merged 1 commit into from
Oct 8, 2022
Merged

Conversation

chenxiaolong
Copy link
Owner

The file descriptor ownership and lifetimes are not clearly documented for Java's standard library classes, like FileOutputStream and FileChannel. Since we always have file descriptors to local files, just call sendfile directly. ParcelFileDescriptor.close() will always be responsible for closing the file descriptors.

The file descriptor ownership and lifetimes are not clearly documented
for Java's standard library classes, like FileOutputStream and
FileChannel. Since we always have file descriptors to local files, just
call sendfile directly. ParcelFileDescriptor.close() will always be
responsible for closing the file descriptors.

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong self-assigned this Oct 8, 2022
@chenxiaolong chenxiaolong merged commit 91481f4 into master Oct 8, 2022
@chenxiaolong chenxiaolong deleted the sendfile branch October 8, 2022 19:42
chenxiaolong added a commit that referenced this pull request Oct 8, 2022
Signed-off-by: Andrew Gunnerson <[email protected]>
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