[launchd-dev] Mac OS-X 10.5 and "two icons bouncing in the dock" problem

Hans-Peter Jansen hpj at urpla.net
Mon Aug 17 08:46:36 PDT 2009


Dear Quinn,

that was the first really useful reply I got, thank you very much.

Am Montag, 17. August 2009 schrieb Quinn:
> At 23:21 +0200 14/8/09, Hans-Peter Jansen wrote:
> >Damien, yes, this looks fishy, and I eliminated the fork completely
> > already. Unfortunately, it doesn't change its behavior.
>
> Either you didn't eliminate the fork, or there is more than one fork
> happening and you've only eliminated one of them.  The symptom you're
> seeing (two icons in the dock) only occurs when two different
> processes both check in to the application-level process management
> system.

You are right - while I did eliminate the fork, I tested a wrong build. 
Oh well... What I don't understand is, how both processes could check into 
process management? The code in question should lead to one process waiting 
for the "main" process finishing. The reason is because pyinstaller does 
have another build mode, where everything is included in one file. That's 
being expanded to a temporary folder on runtime, and the fork is necessary 
to being able to clean up afterwards. That mode isn't useful on the Mac 
anyway, thus we're not loosing much ;-)..

> In situations like this I find the following DTrace script to be
> useful.  It shows you exactly which processes get launched, with
> enough information to work out their parent/child relationships.

Now that's just great. I'm sure, I will find opportunities, where this will 
prove usefulness. Thanks.

> IMPORTANT: Sort the output by the timestamp.  On multi-core machines,
> DTrace can report things out of order.
>
> S+E

Thanks again,
Pete




More information about the launchd-dev mailing list