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

List:       kde-devel
Subject:    Re: KProcess help needed
From:       Malte.Starostik () t-online ! de (Malte Starostik)
Date:       2001-03-23 21:25:28
[Download RAW message or body]

Am Freitag, 23. März 2001 06:59 schrieb Joe Theriault:
> I've been banging my head against a wall for days with a simple kprocess
> problem  I've been trying to get output to stderr sent the parent process.
>
> These are selections of what I would figure would be all the relevant code,
> I figure I missed something silly or there is a common pitfall I'm not
> aware of.
>
>
> KProcess client;
>
> connect(&client, SIGNAL(receivedStdout(KProcess *, char *, int)), this,
> SLOT(transferCompleted(KProcess *, char *, int)));
>
> client.start(KProcess::NotifyOnExit, KProcess::AllOutput);
>
> void AudioGalaxyForKDE2::transferCompleted(KProcess *, char* buffer, int
> buflen)
> {
>   cerr << "\n\n\n\n\ntransfer completed called\n\n\n\n\n\n\n";
> }
>
You're creating the KProcess on the stack. This won't work with anything else 
than start(KProcess::DontCare, KProcess::NoOutput);
What you might want to try is:

KProcess *client = new KProcess;
......

and of course delete the process when appropriate.
-Malte
 
>> Visit http://master.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