How fo force subprocess to refresh stdout buffer?

匿名 (未验证) 提交于 2019-12-03 08:44:33

问题:

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)

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