Domanda

launchd passes the -psn_... parameter to an application. If I understand correctly, this parameter tells me the Process Serial Number, right? But why is it passed? Isn't it just the same as what I would get with GetCurrentProcess? If so, I don't understand why it is passed as a parameter. If that is something different, then what is this parameter and what can I do with it?

Note that there is a very related question about the meaning of PSN. However, that doesn't really answers the question what I am supposed to do with this parameter. Another related question is how to parse it.

È stato utile?

Soluzione

So, my comment on your other question (Python argparse: how to handle MacOSX `-psn` parameter) belongs here, I think. The documentation says:

"The Process Manager provides the cooperative multitasking environment for versions of Mac OS that preceded Mac OS X."

MacOSX was released in 2001, and "cooperative multitasking" is something operating systems don't do anymore since roughly around that time. Also, the API is declared deprecated, it's IMHO safe to simply ignore it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top