From: Stefano Crocco Date: 2008-05-31T21:50:04+09:00 Subject: Re: getting standard error and output from ruby script in real time On Friday 30 May 2008, Dave Bass wrote: > Stefano Crocco wrote: > > of KDE. I'd be glad if someone could give > > me a hint on this, so that at least > > I can know whether I have to look for > > documentation about ruby or about > > KDE. > > It's to do with buffering. Buffering takes place within Ruby (I think) > but also in the operating system. Stderr is usually unbuffered whereas > stdout is usually buffered. I.e. the output is accumulated in a memory > buffer until it reaches a certain size, then the block is flushed to the > output stream. This is a lot more efficient that outputting it > character-by-character to the output device. > > In my experience (various languages and OSes), buffering can cause > problems that are difficult or impossible to resolve. Thanks for the information. I think I'll look at the source code of some tool which does what I want and see how it works. Stefano