-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo test leaves file descriptors to /dev/{u,}random open when exec'ing a binary on Linux #6333
Comments
Tested here; on nightly, file descriptors are open for |
Thanks for the report! I can reproduce what @lukaslueg is seeing with this main program: fn main() {
std::process::Command::new("ls")
.arg("-lah")
.arg("/proc/self/fd")
.status()
.unwrap();
} which for me reports:
It looks like both cc @sfackler, is this something you've run into before with OpenSSL? |
@lukaslueg @alexcrichton Apologies, I mixed up the issue which I'd seen for ~4 months which affects Mac, with some observations that in hindsight were actually the |
sfackler/rust-openssl#1020 should allow us to tell OpenSSL to close Yet I'm unsure: AFAICS |
Interesting! @lukaslueg would you be interested in adding that to Cargo to see if we can solve this? |
Can do. Are we Ok with adding |
We can't pick up the dependency on platforms that don't already use it, but on platforms that already use it thisd be good to fix! |
@alexcrichton maybe I'm missing a simple point but where is the optional |
@lukaslueg it's probably sufficient to gate it on the |
It seems this will require further investigation: |
Hm ok, want to send a patch with |
The change that introduced |
FWIW we're using 1.1.1a in rust-lang/rust, which is used to distribute Cargo/rustc/etc binaries, so we'd see the benefit there at least! |
Problem
cargo test
leaves file descriptors to/dev/{u,}random
open whenexec
ing a binary on Linux.Steps
See @alexcrichton's comment below.
Notes
The text was updated successfully, but these errors were encountered: