Skip to content

Check exit code in Dir::as_raw_fd#2747

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

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

Conversation

@stepancheg
Copy link
Copy Markdown

@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 force-pushed the dir-panic branch 2 times, most recently from 2698f47 to 1ac1cb8 Compare February 23, 2026 04:45
@stepancheg stepancheg marked this pull request as ready for review February 23, 2026 04:46
@SteveLauC SteveLauC self-requested a review May 11, 2026 08:41
@SteveLauC
Copy link
Copy Markdown
Member

I rebased your branch to resolve CI failures.

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.

2 participants