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

Can not get recv_fd #64

Closed
zhangxiaoxu opened this issue May 3, 2018 · 5 comments
Closed

Can not get recv_fd #64

zhangxiaoxu opened this issue May 3, 2018 · 5 comments

Comments

@zhangxiaoxu
Copy link

1

Always receive exception, I delete the highlight part, it works.
Any update?when?

@tonysimpson
Copy link
Owner

Thanks, Do you know why that check is failing?

@zhangxiaoxu
Copy link
Author

In x64 environment, length is 8.

tonysimpson added a commit that referenced this issue May 3, 2018
Documentation isn't clear on the matter  but it seems that the struct module has 'i' as a fixed 4 bytes and 'l' is 4 on 32bit and 8 on 64bit. Not tested on 32 bit build.
@tonysimpson
Copy link
Owner

Should be fixed on HEAD now. Regards.

@codypiersall
Copy link
Contributor

@zhangxiaoxu, could you give more details about the code you were running that caused this issue? I can't reproduce it, and I think commit aed1521 which was in response to this issue may have broken things for 64-bit Linux and Mac.

@radiocane
Copy link

Indeed, I'm 64-bit Linux and commit:aed1521 raises because _INT_PACKER(str('l')).size is 8 while sizeof(int) is 4
I also question the length != size check: I'd say, if the return value is not negative, use the returned length to correctly interpret the value inside buf and be merry.

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

4 participants