Skip to content

The standard streams problem #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hdgarrood opened this issue Dec 27, 2015 · 1 comment
Closed

The standard streams problem #2

hdgarrood opened this issue Dec 27, 2015 · 1 comment
Labels
type: enhancement A new feature or addition.

Comments

@hdgarrood
Copy link
Member

See also joneshf/purescript-node-child-process#4

For each of stdin, stdout, and stderr, the stream will be accessible on the child process object if and only if "pipe" was passed as the relevant stdio options. For example, if you did var child = spawn(cmd, args, { stdio: ["pipe", someStream, "pipe"]}, then you would be able to read child.stderr and write child.stdin, but child.stdout would be null.

Currently, we throw an error if you try to access one of the standard streams after spawning it and passing something other than Pipe for that stream. It might be nice to work out how to do this in a safer way than just failing at runtime, if possible.

@JordanMartinez JordanMartinez added the type: enhancement A new feature or addition. label Dec 7, 2021
@JordanMartinez
Copy link
Contributor

As of #46, ChildProcess guarantees that the stdio is always [ pipe, pipe, pipe, ipc ]. However, more control is provided via the Unsafe module if one wants to use something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A new feature or addition.
Projects
None yet
Development

No branches or pull requests

2 participants