OS X:从Finder启动时,奇怪的-psn命令行参数 [英] OS X: strange -psn command line parameter when launched from Finder

查看:98
本文介绍了OS X:从Finder启动时,奇怪的-psn命令行参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MyApp.app包中的外壳脚本启动的OS X Java应用程序在从Finder启动时会获得一个奇怪的命令行参数-psn_0_989382,但在从Terminal直接启动时却不会.在哪里可以找到信息,此命令行参数有什么用?

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?

推荐答案

Mac OS X为通过GUI启动的所有应用分配唯一的进程序列号("PSN").用于识别可执行程序的各种进程和实例.

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

这篇关于OS X:从Finder启动时,奇怪的-psn命令行参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆