FURTHER EDIT the following is not production code - I\'m just playing around with a couple of classes trying to figure out how I run processes wit
Not answering directly the OP, but as this thread helped me track the right direction, I do want to answer this:
"starting it on a thread is completely pointless"
I have a .Net server that uses NodeJS as its TCP socket manager. I wanted the NodeJS to write to the same output as the .Net server and they both run in parallel. So opening in a new thread allowed me to use
processNodeJS.BeginErrorReadLine()
processNodeJS.BeginOutputReadLine()
processNodeJS.WaitForExit()
while not blocking the main thread of the .Net server.
I hope it makes sense to someone and if you have a better way to implement what I've just described, I'll be more than happy to hear.