Skip to content

Switch to new operation for obtaining file descriptors#5

Open
jeltsch wants to merge 1 commit intoHappstack:mainfrom
jeltsch:high-level-file-descriptor-acquisition
Open

Switch to new operation for obtaining file descriptors#5
jeltsch wants to merge 1 commit intoHappstack:mainfrom
jeltsch:high-level-file-descriptor-acquisition

Conversation

@jeltsch
Copy link
Copy Markdown

@jeltsch jeltsch commented Sep 19, 2025

There is an effort to move some GHC-specific modules out of base. Candidates for such moving are GHC.IO.Handle.Types and GHC.IO.Handle.Internals. These modules are often used for obtaining POSIX file descriptors from Haskell handles. Such a use is also present in the sendfile package in the implementation of the withFd operation.

There is a proposal to add dedicated operations for operating-system handle acquisition to base. A corresponding draft implementation can be found in GHC merge request !14732. The present pull request changes the implementation of withFd to use one of those new operations.

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