Konsole showstopper?

Oswald Buddenhagen ossi at kde.org
Wed Jan 14 16:02:34 GMT 2004


On Wed, Jan 14, 2004 at 04:14:41PM +0100, Oswald Buddenhagen wrote:
> > Problem is that kdebase/konsole/konsole/TEPty.cpp in KDE 3.1 used to have 
> > 	fcntl(m_MasterFd,F_SETFL,O_NDELAY);
> > and that got dropped from kdelibs/kdecore/KPty.cpp for KDE 3.2
> > 
> i know, i did that on purpose. obviously some assumption i made does not
> hold true.
> 
> > Patch attached.
> > 
> yeah, but i would not bet that it is sufficient. i think i depend on the
> fd being blocking somewhere. let me see ...
> 
ok, i checked kprocess and i think it should be perfectly able to handle
non-blocking fds.
however, i suggest patching kprocess instead of kpty, as the problem
is specific to it, and probably not limited to ptys. patch attached.

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
-------------- next part --------------
Index: kprocess.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kprocess.cpp,v
retrieving revision 1.127
diff -U2 -r1.127 kprocess.cpp
--- kprocess.cpp	10 Jan 2004 18:52:22 -0000	1.127
+++ kprocess.cpp	14 Jan 2004 15:55:51 -0000
@@ -898,4 +898,5 @@
 
   if (communication & Stdin) {
+    fcntl(in[1], F_SETFL, O_NONBLOCK);
     innot =  new QSocketNotifier(in[1], QSocketNotifier::Write, this);
     Q_CHECK_PTR(innot);


More information about the kde-core-devel mailing list