Konsole showstopper?

Lubos Lunak l.lunak at suse.cz
Thu Jan 15 09:59:51 GMT 2004


On Wednesday 14 of January 2004 17:02, Oswald Buddenhagen wrote:
> 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.

 Call me picky, but shouldn't the O_NONBLOCK flag be added to other possible 
flags set by F_SETFL? Also, maybe the return value from write() should be 
checked for -1, e.g. because of EAGAIN?

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kprocess.cpp.patch
Type: text/x-diff
Size: 934 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040115/a141cc75/attachment.patch>


More information about the kde-core-devel mailing list