OS X: strange -psn command line parameter when lau

2020-02-26 14:33发布

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条回答
冷血范
2楼-- · 2020-02-26 15:12

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).

查看更多
登录 后发表回答