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

When using the OpenPGP API library, data _returned_ from the OpenKeychain app is through the ParcelFileDescriptor stream is likely to get truncated! #3

Merged
merged 3 commits into from
Aug 28, 2015

Conversation

mgeier63
Copy link
Contributor

This is because the TransferThread doesn't necessarily read all available data back from the OpenKeychain service, because it is stopped immediately after the "execute" call has returned (it's stopped by input.close();)

The obvious solution of simply waiting for (joining) the TransferThread unfortunately does not work, because the TransferThread can not detect remote stream close/end due to the way the pipe FileDescriptors are set up.

This is because the FileDescriptors are "dup"ed when going through parcels, the input ParcelFileDescriptor never realises that the FileDescriptor at the service side has been closed. It works though if the return pipe gets set up on the service side.

Note: The testcase OpenPgpServiceTest doesn't really test IPC as it runs in the same process! I've therefore created a standalone test app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants