Basic.Process - streaming stdout/stderr through closure

Hello, team.

I find the Basic.Process class quite useful, it allows to spawn a true subprocess which will die together with its parent. Foundation's NSTask behaves differently, it detaches the newly created process from its parent so it may become orphan.

One thing could be improved though: the stream interface for stdout/err is missing. I can get the results after the process has finished executing, but I'd like to get the data on the go.

@aciid, I can see you have similar functionality in your Spawn library, I wonder why haven't you ported it back to SPM?

1 Like

I've implemented this, basically ported functionality from Spawn library.

Tested on my project and it seems to be working.

1 Like

Great, thanks for creating a PR!