[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-26 3:15:14
Message-ID: cvoov8$8s4$1 () sea ! gmane ! org
[Download RAW message or body]

Oswald Buddenhagen wrote:

> On Fri, Feb 25, 2005 at 01:29:39PM -0600, Christopher J. Bottaro wrote:
>> It doesn't receive signals for the other half of line3..line2 and the
>> "Continue y/n?".
>> 
> let me guess ... the program does not output a \n after the question
> mark? if so, "man stdio" does can do wonders ...
> otherwise an strace of the failing kde program could help.
> 

"Output streams that refer to terminal devices are always line buffered by
default"

KProcess::setUsePty() fixed the problem...thanks.  Now on to the problem of
how to read the non newline terminated "Continue y/n?".  Any suggestions?

Btw, I don't think you understood my original question.  The newline
terminated output strings before the "?" line weren't producing signals. 
But your RTFM suggestion lead me to find out that stdio is only line
buffered if associated with a terminal device, hence KProcess::setUsePty()
got it to behave how I expect.  At least thats my take on it.  I have to
admit, there are other weird things going on...

 
>> 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