KProcess documentation fix

Oswald Buddenhagen ossi at kde.org
Mon Nov 13 08:28:07 GMT 2006


On Fri, Nov 10, 2006 at 05:42:46PM +0100, Andreas Pakulat wrote:
> I'd like to know if it is ok to commit the attached change to
> kdelibs/3.5. It fixes the KProcess documentation by documenting that
> using QProcess and KProcess in the same application leads to problems
> when using KPorcess::Block (see the KProcess thread here).
> 
that analysis is incomplete and thus misleading.
mixing (as in using at the same time) qprocess and kprocess in *any* way
will cause problems.
it's also untrue that the problem is qprocess installing the signal
handler each time. in fact, the problem is qprocess considering itself
the only party interested in SIGCHLD. while this is fine for an
application, it is not particularly nice of a libraray. the (sort of)
correct behavior is the one of kprocess: chaining signal handlers
(sounds a bit like interrupt redirection from "good" ol' DOS times,
huh?).
a possible workaround would be starting a qprocess before kprocess
installs its handlers (that is, before constructing the kapplication)
and keeping it alive until the kapp exits. i guess "cat" would be a good
do-nothing-candidate.

fwiw, qt4 is a good citizen here.

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list