psn参数由MacOSX启动。我该怎么办? [英] psn parameter by MacOSX launchd. what can I do with it?

查看:84
本文介绍了psn参数由MacOSX启动。我该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

launchd将 -psn _... 参数传递给应用程序。如果我理解正确,那么此参数会告诉我进程序列号,对吗?但是为什么要通过呢?它与我 GetCurrentProcess ?如果是这样,我不明白为什么将其作为参数传递。如果那是不同的东西,那么此参数是什么,我该如何处理?

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?

请注意,这里有一个非常有关PSN含义的相关问题。但是,这并不能真正回答我应该如何使用此参数的问题。另一个与相关的问题是如何解析

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.

推荐答案

因此,我对您的其他问题的评论(属于这里。 文档说:

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

进程管理器为Mac OS X之前的Mac OS版本提供了协作式多任务环境。

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

MacOSX于2001年发布,协作多任务是大约从那时起操作系统不再做的事情。另外,该API被声明为已弃用,恕我直言,可以忽略它。

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.

这篇关于psn参数由MacOSX启动。我该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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