I'm trying to tee the standard output NSPipe one of NSTask to get two NSPipes, each of which will go into the standard input of two new NSTasks.
I know I can do this in C with the tee
function, but I couldn't find it in neither the Foundation nor Darwin frameworks. How can I achieve this?
I wrote a solution to this and it is working well in my project. I have made a Swift package available on GitHub. You can also find examples of its use there. Here is the code: