[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Output of child processes
From:       Waldo Bastian <bastian () suse ! de>
Date:       1999-08-05 7:17:26
[Download RAW message or body]

On Wed, 04 Aug 1999, Roberto Alsina wrote:
> On Wed, 4 Aug 1999, Bernd Gehrmann wrote:
> 
> > When I process the output of child processes - whether
> > find or cvs - their output seems to come in large chunks 
> > instead of line by line which would be preferable for
> > a user interface. This is independent from the method
> > by which I use them - it occurs with popen() as well as
> > with KProcess. I suspect (but I'm not sure) that the libc 
> > of these programs recognizes that it's not connected with 
> > a terminal and therefore prefers to buffer its output. Is 
> > that really the problem? If yes, how can I avoid that?
> 
> Process output in popen() is buffered. That's life. There's no portable 
> way to make it unbuffered, either.
> 
> Of course, if I'm wrong, someone correct me (and tell me how to do it ;-)

Hiya,

I asked the local glibc guru. You either have to change the sending
program (no option I guess) or you have to create a virtual terminal
like kvt/konsole does. No easy solutions available I'm afraid.

Cheers,
Waldo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic