[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Race condition in KUniqueApplication
From: Krzysztof Lichota <krzysiek () lichota ! net>
Date: 2007-04-01 17:42:03
Message-ID: 460FEEEB.8030709 () lichota ! net
[Download RAW message or body]
Krzysztof Lichota napisaĆ(a):
> While investigating Ark bug I have come across possible race condition
> in KUniqueApplication.
>
> It does the following (if --nofork is not set):
> - fork a child
> - child checks if application is running, if not spawns it
> - child reports to parent using pipe if application is running
> - parent sends to application DCOP call to create new instance
> - if DCOP call fails, it just aborts
>
> If application is during shutdown (which happens often with Ark when it
> is unpacking files), the check for application running in child is
> successful, while the DCOP call in parent fails and starting app fails.
>
> IMO the right thing to do would be to make DCOP call in child and repeat
> call (and spawning the process) if it fails. This involves many changes
> in the code, so I tried the other approach: repeat everything in parent
> process. This works much better (although does not solve Ark bug
> completely, so I have to investigate it further).
> Anyway, the patch (preliminary, it is not intended for applying) is
> attached, what do you think of this whole problem? Have I missed
> something? Should I try to move the DCOP call and loop in child?
Any comments?
Krzysztof Lichota
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic