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

0-length recvmsg is platform-specific but returns bogus fd -1 rather than raising #5

Open
dsheets opened this issue Nov 5, 2013 · 1 comment

Comments

@dsheets
Copy link
Contributor

dsheets commented Nov 5, 2013

Depending on what kernel you run, a 0-length recvmsg may still transmit an fd or it may hang forever. Should an exception be raised in the 0-length receive case pre-emptively rather than either returning the bogus fd -1 or blocking indefinitely?

@dsheets
Copy link
Contributor Author

dsheets commented Nov 5, 2013

The POSIX man page http://www.unix.com/man-page/POSIX/3posix/recvmsg/ says

If no messages are available to be received and the peer has performed an orderly shutdown, recvmsg() shall return 0.

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