开发者

Redirecting standard output when generated

开发者 https://www.devze.com 2023-01-31 19:15 出处:网络
I am trying to redirect the output of a c program which generates output in the console. I can redirect the output once the process exits. But is there the way to redirect the output as and when the开

I am trying to redirect the output of a c program which generates output in the console. I can redirect the output once the process exits. But is there the way to redirect the output as and when the开发者_开发问答re is some output in the shell window? I require this to make it understandable that the program is running and since different steps of the c code may take, say 10-15 minutes to run.

Thanks in advance for any help.


I'm guessing the code that you're using is using ReadToEnd on the StreamReader. If so, just use Read or ReadLine to get access to the stream as its written.

0

精彩评论

暂无评论...
验证码 换一张
取 消