[Qt-interest] Does QProcess::readAllStandardOutput have a limit?
Andreas Pakulat
apaku at gmx.de
Thu Dec 2 22:37:30 CET 2010
On 02.12.10 19:16:43, Eric Clark wrote:
>
>
> > -----Original Message-----
> > From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> > bounces at trolltech.com] On Behalf Of Thiago Macieira
> > Sent: Thursday, December 02, 2010 1:01 PM
> > To: qt-interest at trolltech.com
> > Subject: Re: [Qt-interest] Does QProcess::readAllStandardOutput have a
> > limit?
> >
> > Em Quinta-feira, 2 de Dezembro de 2010, às 19:31:28, Eric Clark escreveu:
> > > I was wondering if anyone knew of some sort of limitation on the
> > > number of bytes that readAll, readAllStandardOutput, or
> > > setStandardOutputFile will read from the process? In all cases, the
> > > text is cutoff at the same point in the output. I do not see anywhere
> > > in the documentation for QProcess where it says there is a limit, but
> > > the results I am getting leads me to believe that there is a limit.
> >
> > The limit probably comes from the Operating System's pipe buffer limits and
> > scheduling. It's not a hard limit, it just happens that your process was woken
> > up when the data wasn't complete.
> >
> > You should receive the rest of the data soon.
>
> What do you mean by soon? I am not receiving any more calls to my slot
> connected to the readyReadStandardOutput signal. The process that is
> running outputs a bunch of startup text and then goes into an infinite
> loop waiting to receive commands.
The easiest way to find out wether the reason you only see part of the
output is by exiting the subprocess. The OS usually buffers stdout of a
process, so if you pipe stdout to the parent process (which is what
QProcess does behind the scenes), then you only get to see the stuff the
subprocess writes after that pipe-buffer is full or if the subprocess
exits.
Andreas
--
You'll be sorry...
More information about the Qt-interest-old
mailing list