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

List:       kde-devel
Subject:    Re: problems using KProcess
From:       Andras Mantia <amantia () kde ! org>
Date:       2006-11-30 21:31:59
Message-ID: 200611302331.59348.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 08 November 2006 19:45, Andreas Pakulat wrote:
> Hi,
>
> I'd like to run a command (qmake) inside my application and capture
> its error-output. I want the execution to block my application until
> it finished (please no discussion wether that is a good idea or not).
>
> I thought executing KProcess::start(KProcess::Block,
> KProcess::Stderr) would do that. It doesn't, start() returns
> immediately and normalExit function returns false.
>
> I discovered setUseShell and tried that, so qmake runs in a shell.
> This works if I use KProcess::NotifyOnExit, but when using
> KProcess::Block start never returns and I see a qmake Zombie and a
> sleeping bash in the process list.
>
> Anybody got an idea how I might achieve what I want?

If you didn't solved this problem yet, I posted a patch on KDevelop list 
with a BlockingKProcess class inside doing the same for stdout. It is 
trivial to extend to stderr (and move it to the library part of 
KDevelop). It uses KProcess and the NetAccess style hack to make an 
asynch operation synchronous.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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