Phyx/winio permissions and mode fixes#234
Conversation
3c7f049 to
ea44a2f
Compare
ea44a2f to
a101311
Compare
snoyberg
left a comment
There was a problem hiding this comment.
LGTM, though I only superficially understand this. Does this need a more thorough review from others? And does this warrant an immediate release, or is it acceptable to wait till the next release?
Co-authored-by: Michael Snoyman <[email protected]>
Cheers! Thanks for taking a look! Hmm we can wait a day or two see if @bgamari has any comments, but other than that it fixes the last bits of errors in the GHC testsuite when the new I/O manager is enabled by default. I don't think it needs an immediate release, we're aiming to enable the I/O manager by default in GHC 9.4, so as long as the code is committed I can bump up the submodule in GHC to kick the CI along. |
|
Cool, I'll wait a few days to hear from @bgamari but otherwise merge at the end of the week. |
|
Thanks! |
Hi,
This PR fixes several issues:
createPipewere accidentally swapped. Thereadend gotwritepermissions while thewritepart gotreadpermissions in Haskell. The permissions were correct in the underlying OS object but this caused a very weird message when the handles were used. This corrects them so they're in sync.createPipein that since we don't know who's going to use which part of the handles that it's the caller's responsibility to associate the handles with the correct I/O manager. This documents an example on how to do so.messageandbyte, essentiallychunkandstreamingmode.CreateNamedPipeWdefaults tomessagemode whileCreateFiledefaulted tobytemode. However the modes need to match. This corrects it by always setting both modes explicitly ensuring that both ends always match. For these pipes we default tochunkinstead ofstreamingmode as things such asiservrequire the entire message in order to continue anyway.This fixes the last issues to enable the new I/O manager with iserv support in GHC.
/cc @bgamari