redirect process's output to file

2021-07-15 Thread christianschoe
I've been experimenting with the code from Clonk and I noticed, that `process.outputStream.readAll()` makes the nim programm wait for all output of the process (also if the process sleeps for several seconds). That's kind of surprising in my opinion because it's not described like this in the d

Misleading error message from startProcess()

2021-07-09 Thread christianschoe
Hello dear community, I want to inform you about a bad error message that occurs when you call `startProcess` with a wrong `workingDir`. (I hope the category is the right one) const correct_path = "/home/user/" const wrong_path = "home/user/ #Works fine: let p = startPro

redirect process's output to file

2021-07-09 Thread christianschoe
Thank you very much, both of these code snippets are exactly what I was looking for. I have one questions regarding the second one: What do I do if the process runs for a while and I don't want to wait for that? That includes: * Do I have to call `close` to "cleanup related handles"? If yes,

redirect process's output to file

2021-07-08 Thread christianschoe
My account was new and it took a couple of days for an admin to give me the "user" status, so that this post is public. So maybe I have to draw some attention to it by replying to my own post...

redirect process's output to file

2021-06-27 Thread christianschoe
Hello dear community, I'm trying to create a new process from a python file that should write its output either on the console or in a seperate file (depending on the users choice). Writing to the console is easy using `poParentStreams`. But I don't know how to redirect the output stream to a