用stdin stdout和stderr启动一个exe /进程? [英] launch an exe/process with stdin stdout and stderr?
本文介绍了用stdin stdout和stderr启动一个exe /进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用C ++如何使用stdin stdout和stderr启动一个exe /进程?我知道如何做到这一点在.NET和我记得在过去使用popen,但popen似乎允许stdin或stdout不是两个,而不是所有3。
With C++ how do i launch an exe/process with stdin stdout and stderr? I know how to do this in .NET and i remember using popen in the past but popen seems to allow stdin OR stdout not both and not all 3.
我需要这个
推荐答案
对于windows,我们需要一个linux解决方案,请查看使用重定向输入和输出创建子进程
For windows, look at Creating a Child Process with Redirected Input and Output
对于unix,请查看此示例。
For unix, look at this sample.
这篇关于用stdin stdout和stderr启动一个exe /进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文