OSSubprocess icon indicating copy to clipboard operation
OSSubprocess copied to clipboard

Reopening `stdinStream`?

Open hellerve opened this issue 5 years ago • 0 comments

I’ve been trying to use OSSubprocess to interact with a REPL environment which requires me to write to the input stream, and read the result back, over and over again. I thus am not using the library for quick one-shot shell commands, but to interact with a background process

As has been pointed out in the README, I currently have to close the stdinStream for the content to be sent over, and reopening it doesn’t seem to attach it to the process (at least not using redirectStdin)—this is completely reasonable behaviour. Is there a way to reopen the pipe or continue reading/writing even after the first chunk? If not, is this something that could possibly be done? Or is this out of scope for the library? (And, if so, do you have any idea what library to use instead, though I understand that this is not your responsibility)

Cheers

hellerve avatar Dec 14 '19 17:12 hellerve