Serious KProcess Flaws

Waldo Bastian bastian at kde.org
Thu Jun 26 21:50:42 BST 2003


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

On Thursday 26 June 2003 22:05, Charles Samuels wrote:
> I found an extremely serious bug in KProcess.  If one wants to use a
> waitpid themselves, they'll find that KProcessController randomly will
> waitpid(-1, ...).  This happens in
> KProcessController::delayedChildrenCleanup().
>
> I don't really understand the rationale for that function, so don't know
> how to fix it.  Please advise!
>
> Also, near the end of KProcessController::theSigCHLDHandler(int arg),
> waitpid(-1, ...) happens, on the condition that there is no
> KProcessController.  Why is KProcessController so arrogant as to think that
> it should 1) be the only SIGCHLD handler, and 2) insist that all children
> be started with KProcess?

Hey, it has improved a lot already. Since recently (3.0 ?) you can actually 
use waitpid as long as you don't enter the event loop. 

If you enter the event loop you can just as well use KProcess.

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE++1yiN4pvrENfboIRAjXeAJ9AOjJYVAbW60qKw5syBani/gWUtQCeLRXX
Qh6AhZZ8pBX9NfCT/8n7Qog=
=etDA
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list