[Qt-interest] QProcess output every five seconds ..

R. Reucher rene.reucher at batcom-it.net
Tue Mar 24 09:32:02 CET 2009


On Tue March 24 2009 08:35:08 chandrasekar wagmare wrote:
> ...
> [snip]
> ...
>
> and agin after 5 minutes it appending the same amount of text ....
>    i dont know how to solve the problem .... please help ..
Most probably it's a problem of an incorrectly setup buffering method... and 
you won't be able to solve this from within your calling program. 
Either "patch" the program you are calling to use line buffering --  
setlinebuf(stdout) -- or use fflush(stdout) every now and then in this 
program. If you can't do this, then there's no way to solve it.

It's NOT a problem of QProcess or anything you could solve by any trickery 
here... I have similar issues with some of the programs that I call from some 
of my apps and there's no way around it (at least no platform independent 
one).

I've never tried this with glxgears, but an easy way to check if it is one of 
those programs which behave "incorrectl" would be to use "glxgears | less" 
for example. This is basically the same...

(yes, just confirmed: it behaves exactly this way!)

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

It is one of the superstitions of the human mind to have imagined that
virginity could be a virtue.
		-- Voltaire




More information about the Qt-interest-old mailing list