[Xquartz-dev] LSBackgroundOnly at runtime

Derek Fawcus dfawcus at cisco.com
Wed Dec 5 17:53:50 PST 2007


On Wed, Dec 05, 2007 at 05:45:25PM -0800, Jeremy Huddleston wrote:
> 
> On Dec 5, 2007, at 15:14, Derek Fawcus wrote:
> > Actually - just what does '-psn_' imply?
> 
> It is passing in the process serial number on the command line AFAICT.

My question was more of a 'why' than a 'what'.

> I think you're confused here

quite possibly.

> (or maybe I am).  Each process has a psn  
> associated with it which is analogous to a unix pid (and you can map  
> between the two).  So the process knows its psn, and LaunchServices  
> just makes it easier to get the info by passing it on the command line  
> as well.

Your statement implies a static mapping (which may well be the case).

I had been assuming it was a dynamic mapping - a PSN not being associated
with a pid until one is requested.

> > This would seem to fit with keyboard events being available for an  
> > program run
> > from the cli which then uses TransformProcessType (i.e. not in a  
> > bundle,  and
> > not started by 'open -a').
> 
> Actually, I don't think it has to do with it being a bundle versus  
> not.  I think it has to do with being a foreground versus a background  
> application.

That is what I tried to express - the transform allows it to get keyboard
events.  Normally an unbundled program will not be a foreground task,
and so cannot get such events.

DF


More information about the Xquartz-dev mailing list