[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KProcess doesn't produce receive signal when waiting on input.
From: "Christopher J. Bottaro" <cjbottaro () alumni ! cs ! utexas ! edu>
Date: 2005-02-28 6:56:34
Message-ID: cvuf0r$h76$1 () sea ! gmane ! org
[Download RAW message or body]
Oswald Buddenhagen wrote:
> On Fri, Feb 25, 2005 at 09:15:14PM -0600, Christopher J. Bottaro wrote:
>> KProcess::setUsePty() fixed the problem...thanks. Now on to the problem
>> of
>> how to read the non newline terminated "Continue y/n?". Any suggestions?
>>
> with the pty, it should work. kprocess does not buffer anything. btw,
> don't expect the output to be line-blocked; if you want certainity, you
> have to use kprocio
Heh, I was doing my own buffering until I found out about KProcIO...I'm
using that now, its very convenient, I like it.
> (but then you might really have a problem with
> incomplete lines).
I actually took a cheap hack way out. There is a line that is "constant"
that appears a few lines before the prompt. When that line comes in via
KProcIO, I fire off a QTimer.singleShot() to a slot that "manually" prints
the prompt to the user. Then when the users answers the prompt and the
prompt text comes in via KProcIO, I just don't echo it.
>> 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