[PATCH] KIO::SlaveBase and the event loop
thiago at kde.org
Tue Jul 15 23:06:21 BST 2008
Roland Harnau wrote:
>2008/7/15, Thiago Macieira <thiago at kde.org>:
>> No. We've wanted separate processes for ioslaves for the whole time,
>> since this improves stability. IOSlaves are add-on plugins (yay for
>> multiple redundant buzzwords meaning the same thing!) that can come
>> from many different sources. We can't really vouch for the stability
>> of them.
>This is equally true for Plasma applets, but they are nevertheless
>in-process entities. It should be sufficient if the IO slaves
>delivered with KDE are stable enough.
>> Besides, we can't know if the code in the ioslaves is using a
>> non-reentrant function or not.
>Are there actually IO slaves in the KDE main packages using
>non-reentrant (I assume this is Qt lingo, i.e. reentrant vs.
Oh, yeah. They use chdir(), non-reentrant glibc calls, they use
third-party libraries that aren't reentrant, etc.
We could only load an ioslave in-process if we started rewriting them from
Besides, using threads instead of processes means we can't hand over
slaves from one application to the other (Konqueror to KWrite, for
instance, for opening a file).
Also note that all ioslaves are forks from kdeinit. All the main libraries
are already loaded and there's no D-Bus connection -- it's only a plain,
simple Unix socket that connects to the application.
>> If we used threads, a badly behaving ioslave could crash Konqueror,
>> KWrite, Kile, KWord, anything that uses KIO. Right now, it crashes on
>> its own and its name is pointed out.
The difference to Plasmoids here is that a badly behaving plasmoid would
crash plasma. A badly behaving ioslave plugin thread would crash any and
all KDE applications.
By the way, in KDE 3 kicker used a proxy process for some of its applets.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel