KProcess bug or something wrong in kdevelop?

Andreas Pakulat apaku at
Fri Nov 10 15:16:42 GMT 2006

On 10.11.06 08:16:12, Oswald Buddenhagen wrote:
> On Thu, Nov 09, 2006 at 05:18:15PM +0100, Andreas Pakulat wrote:
> > Still I don't think this is expected behaviour of KProcess and the
> > docs explicitly state that I can read stderr/stdout with
> > KProcess::Block.
> > 
> indeed. i think i even heard such a bug report a year ago or more,
> actually.
> maybe a strace -ff -tt of a failing run and one of a successful run
> would help to get a clue. i'm pretty sure this is some race condition.

On IRC/#kdevelop somebody pointed out that the problem might be using
QProcess and KProcess inside the same unix process. Both classes install
unix-signal handlers, but QProcess does this on every instance creation.
KProcess only seems to do this when it is created first.

One possible solution would be to always use KProcess instead of
QProcess but only converting kdevelop itself would be quite some work,
not to mention that kdevelop might load a kpart that uses QProcess...

The better solution IMHO is that KProcess installs the signal handlers
everytime it is instantiated. 

I guess its too late to get a fix into 3.5.6, thus I'll open a bugreport
about this.


Your motives for doing whatever good deed you may have in mind will be
misinterpreted by somebody.

More information about the kde-core-devel mailing list