Skip to content

Conversation

@lukadev-0
Copy link
Contributor

Fixes a bug where child.stdin:close() on a child process created by process.create() did not actually close the stdin, this caused processes which read from stdin until EOF to wait indefinitely.

On Unix, calling close on async-process::ChildStdin does not actually close the underyling writer. This is due to it using async_io::Async under the hood on Unix, whose close implementation just flushes the underlying writer.

This has been fixed dropping the ChildStdin on close, which will close the underlying writer. The internals of the child writer have also been refactored a bit. An existing test has been updated to catch this bug.

Fixes a bug where `child.stdin:close()` on a child process created by
`process.create()` did not actually close the `stdin`, this caused
processes which read from stdin until EOF to wait indefinitely.

On Unix, calling `close` on `async-process::ChildStdin` does not
actually close the underyling writer. This is due to it using
`async_io::Async` under the hood on Unix, whose `close` implementation
just flushes the underlying writer.

This has been fixed dropping the `ChildStdin` on close, which will close
the underlying writer. An existing test has been updated to catch this
bug.
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