Skip to content

Conversation

@Mistuke
Copy link
Contributor

@Mistuke Mistuke commented Jun 7, 2020

Fixes #181, the documentation seems to have been misread, the argument to _pipe is the number of bytes to reserve for pipe communications, not the number of pipes to create. This ended up making pipes that can only send 2 bytes at a time.

The pipes are created in blocking mode, so any write of larger than 2 bytes block and no read returns more than 2 bytes..

Instead use 8k which is the size of the internal Buffers in Base which back I/O calls.

Fixes haskell#181, the documentation seems to have been misread, the argument to `_pipe` is the number of bytes to reserve for pipe communications, not the number of pipes to create.  This ended up making pipes that can only send 2 bytes at a time.

Instead use 8k which is the size of the internal Buffers in `Base` which back `I/O` calls.
Copy link
Collaborator

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super fast fix, thanks!

@snoyberg
Copy link
Collaborator

snoyberg commented Jun 7, 2020

@TerrorJack Could you review if this addresses your issue?

Copy link
Contributor

@TerrorJack TerrorJack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated locally.

@snoyberg snoyberg merged commit f2f0c2f into haskell:master Jun 8, 2020
snoyberg added a commit that referenced this pull request Jun 8, 2020
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.

createPipe doesn't work on Windows

3 participants