Last KProcess commit broke things (namely K3B)

Andras Mantia amantia at kde.org
Sat Jan 17 09:00:41 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The patch seems to work, but:

- - this way the behavioral compatibility is broken
- - might be other applications that will not work correctly under KDE 3.2
- - does such patch work correctly also under KDE 3.1.x?

Andras

On Saturday 17 January 2004 01:06, Oswald Buddenhagen wrote:
> On Fri, Jan 16, 2004 at 09:20:57PM +0200, Andras Mantia wrote:
> >  I think this is really a showstopper after a fix for a showstopper...
> > Without the attached patch (which is a revert of Ossi's fix) you cannot
> > write data CD's anymore with K3B, as mkisofs will complain:
> >   Resource temporarily unavailable. cannot fwrite 32768*1
>
> ok, problem identified. the attached patch should fix it - untested.
>
> the situation:
> - k3b spawns cdrecord with full io redirection. consequently (with my
>   kdecore patch), the parent process' end of the stdin socketpair is set
>   to non-blocking operation.
> - after that, k3b spawns mkisofs. the culprit is, that it duplicates the
>   parent's stdin end of the other process directly to this process'
>   stdout. in itself this is no problem. however, the file descriptor
>   which is duped here was set up by kprocess for its own purposes; no
>   specific properties of it are documented. in fact, this already
>   changed once in the other direction in kde 3.1 (the commented out code
>   in k3bprocess documents this).
>
> essentially the problem is kprocess' poor encapsulation, which seduces to
> making assumptions ...
> i plan to rewrite the kprocess api for kde 4, but for now we are stuck
> with two suboptimal solutions:
> - keep kprocess, declare k3b buggy and patch it
> - keep k3b, revert kprocess, document that writeStdin supports at most
>   4K big blocks (at least on linux that's the pipe buffer's size) and
>   patch konsole accordingly. however, this is still not warranteed to
>   work always - if the other end does not read the entire buffer at
>   once, we still may end up with a blocking write and a deadlock.
> ergo, i vote for the first solution ...
>
> greetings

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQFACPm/TQdfac6L/08RAnVNAKCt2AydfWD5w8q6EcJWlnBlZiapVQCg2t9/
ifK4wO+8J8akveo5fluefEQ=
=5vwb
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list