实时重定向标准输出 [英] Redirecting stdout in realtime

查看:136
本文介绍了实时重定向标准输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

弄清楚,如果是本机的win32控制台应用程序
没有刷新其stdout和stderr,
实时重定向其输出是一个巨大的问题!

是否可以重定向坏"(没有fflush(stdout))控制台应用程序?

还找到了此解决方案 [
谢谢!

Hi!

Figured out, that if a native win32 console application
didn`t flush its stdout and stderr,
redirecting its output in realtime is huge problem!

Is it possible to redirect ''bad''(without fflush(stdout)) console apps?

Also found this solution[^], by _Olivier_, but I don`t want to use
any stubs an ''between stuff''!

Thanks!

推荐答案

类似 _Oliver_ [ ^ ]完成了他的作业:)

如果您是子进程的作者,则可以查看 ACE [ ^ ]

ACE是一个非常不错的C ++库,适合实时开发.它还具有非常灵活的日志记录实现:)

问候
Espen Harlinn
Seems like _Oliver_[^] has done his homework :)

If you are the author of the child process you can take a look at ACE[^]

ACE is a very nice C++ library, suiteable for real time development. It also have a very flexible logging implementation :)

regards
Espen Harlinn


由于这不是答案,因此被移至评论.

请不要发布确实应该是评论的答案.

谢谢!
Since this was not an answer it was moved to a comment.

Please don''t post something as an answer that should really be a comment.

Thank you!


这篇关于实时重定向标准输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆