[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Corruption in KProcess returned buffer
From: Colin Desmond <colin.desmond () btopenworld ! com>
Date: 2002-07-24 18:55:46
[Download RAW message or body]
I am trying to capture the Stdout from a process run through KProcess.
I set the signal handler up as follows:
connect (&profile_generator, SIGNAL (receivedStdout (KProcess*,
char*, int)), this, SLOT (gprofStdout (KProcess*, char*, int)));
then call
profile_generator.start (KProcess::Block, KProcess::AllOutput);
and handle the returned value in
void KProfWidget::gprofStdout (KProcess *, char *buffer, int buflen)
{
cout << buffer << endl;
mGProfStdout += QString::fromLocal8Bit (buffer, buflen);
}
The buffer being returned and displayed is corrupted, here is an example:
0.00 0.00 8íÿ¿¢ 327/601319
vnl_diag_matrix<double>::operator()(unsigned int, unsigned int) [9]
^^^^ corruption
This occurs at various points throught the string (this example is 8248
bytes long, although buflen is 1024)
This is with KDE 3.0.2 under Redhat 7.3.92 (Limbo) - same under 7.3.
Does anyone have any idea what is going on?
Thanks
Colin
>> 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