-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Command-testO-macosOS: macOSOS: macOSS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Description
Problem
cargo test
occasionally leaves a file descriptor open when exec
ing a binary.
Steps
The following as a test with harness = false
in the Cargo.toml:
use std::path::Path;
fn main() {
for fd in 3..1024 {
assert!(!Path::new(&format!("/dev/fd/{}", fd)).exists());
}
}
sometimes balks on Mac, specifically at fd 6
, which if you try to open it with File::open("/dev/fd/6")
is most of the time successful but sometimes returns ErrorKind::PermissionDenied
aka EPERM
.
Notes
Witnessed on nightlies for the last ~4 months.
I see this on travis (at least on macos-10.13-xcode9.4.1) running this test occasionally but haven't observed locally. Will update if/when I have more details; documenting in case anyone else observes in the meantime.
cargo 1.32.0-nightly (241fac0e3 2018-11-09)
Metadata
Metadata
Assignees
Labels
Command-testO-macosOS: macOSOS: macOSS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Type
Projects
Status
No status