OS X: strange -psn command line parameter when launched from Finder

半城伤御伤魂 提交于 2019-12-21 03:27:12

问题


Our OS X Java application which is launched by a shell script inside the MyApp.app bundle gets a strange command line parameter -psn_0_989382 when launched from the Finder, but not when launched directly from the Terminal. Where can I find information what this command line parameter is good for?


回答1:


Mac OS X assigns a unique process serial number ("PSN") to all apps launched via GUI. It's used for identifying various processes and instances of executables.

There's nothing I can really add to the documentation, so the best thing is to read the ProcessSerialNumber section of the Carbon Process Manager Reference (original Apple link is dead; this is a mirror).



来源:https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder

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