-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
TcpListener::bind example gets stuck in an infinite loop for non-privileged users #14409
Comments
What OS and rust version? |
Closing, this is just the specific example itself. It's not suck in bind, but rather suck in an infinite loop. The |
Reopening, because I think the example should either mention that, or handle errors properly, because I'm sure @glandium isn't going to be the only one to hit this. |
(I updated the title/description.) |
Maybe |
Maybe the example could use try! |
Is this still a relevant issue? |
It still reproduces. Using the transparent trait implementations on |
cc me |
With new io, this now fails on the unwrap. |
minor: Add user facing command for reloading proc-macros in VSCode
…-reload-proc-macros-command, r=Veykril finish renaming `rust-analyzer/reloadProcMacros` to `rust-analyzer/rebuildProcMacros` I was trying out rust-lang#14409, but noticed that actually _running_ that command resulted in VS Code raising an error. This allows me to successfully run `rust-analyzer/rebuildProcMacros`.
It's just using the trait implementations for
IoResult<T>
, and not handle the errors, so the repeated.incoming()
calls all returnNone
immediately, meaning the loop makes no progress.It would preferably handle the errors, or at least mention that this might happen.
Old description:
Stuck on TcpListener::bind when the underlying bind() syscall fails
Taking the example on http://doc.rust-lang.org/std/io/net/tcp/struct.TcpListener.html and running it as non privileged user (which can't bind port 80) leads to the program stuck on TcpListener::bind according to gdb. Strace shows the bind() syscall returning EACCES, but the rust program just doesn't move or errors out, or whatever. The same happens for EADDRINUSE.
The text was updated successfully, but these errors were encountered: