[Qt-interest] Problems running QProcess under linux
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Mon Sep 26 20:20:06 CEST 2011
No reading from the console, only writing.
Scott
-----Original Message-----
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
[mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
Behalf Of Thiago Macieira
Sent: Monday, September 26, 2011 11:04 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Problems running QProcess under linux
On Monday, 26 de September de 2011 13:37:19 Bill Crocker wrote:
> Scott Aron Bloom wrote:
> > Thanks.. the problem here is the crash takes 3-4 hours of running to
> > crash.. and has yet to be reproduced when run with the same command
> > line arguments from the CLI only... hence my thoughts that it might
> > be a QProcess settings issue...
>
> Create a small program which dumps all resource limits using
> getrlimit. Run this from a QProcess and see if the limits differ from
> a command line run.
>
> You can also dump its list of env vars and see if there are any
> differences there.
Usually, the only difference between running from the command line and
using QProcess is stdin, stdout and stderr. From the command-line, they
are connected to a terminal; from QProcess, they are connected to a
pipe.
By default, libc uses line-buffering with stdout when connected to a
terminal, but full buffering when it's a file or pipe,
Also, reading from a terminal respects terminal settings (canonical
mode, for example), whereas reading from a file or pipe is just that:
reading.
It might be that the child process attempts to read a chunk of data
expecting to get at most one line, but it eventually gets more than that
and then falls out of sync.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
More information about the Qt-interest-old
mailing list