How fo force subprocess to refresh stdout buffer?

时光毁灭记忆、已成空白 提交于 2019-12-22 05:39:25

问题


Platform: windows 8.1 IDE: vs2013 use c/c++

Process A read stdout of subprocess using pipe redirect.

but subprocess dont invoke fflush after printf, so processs A cant read anything from pipe before subprocess run to end.

ps: I have souce code of subprecess, but its very hard to modify them.

So whether Process A can force subprocess refresh stdout buffer to read something before subprocess run to end? (the same effective as fflush)

来源:https://stackoverflow.com/questions/22527010/how-fo-force-subprocess-to-refresh-stdout-buffer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!