psn parameter by MacOSX launchd. what can I do with it?

[亡魂溺海] 提交于 2020-01-15 08:56:43

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/19661637/psn-parameter-by-macosx-launchd-what-can-i-do-with-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!