Skip to content

Check exit code in Dir::as_raw_fd#2747

Open
stepancheg wants to merge 1 commit intonix-rust:masterfrom
stepancheg:dir-panic
Open

Check exit code in Dir::as_raw_fd#2747
stepancheg wants to merge 1 commit intonix-rust:masterfrom
stepancheg:dir-panic

Conversation

@stepancheg
Copy link

@stepancheg stepancheg commented Feb 23, 2026

What does this PR do

libc::dirfd should not fail. But if does, we better do some error detection (panic) rather than quietly returning incorrect value.

Alternatively we can stop implementing AsRawFd.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@stepancheg stepancheg marked this pull request as ready for review February 23, 2026 04:46
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

Successfully merging this pull request may close these issues.

1 participant