【问题标题】:MacOSX: find out if a process (given a PID) is running in 32bit or in 64bit Intel modeMacOS:找出进程(给定 PID)是在 32 位还是 64 位 Intel 模式下运行
【发布时间】:2011-11-12 05:02:37
【问题描述】:

我有一个 PID,我想知道进程是在 32 位还是 64 位 Intel 模式下运行。怎么样?

【问题讨论】:

    标签: macos unix pid mach-o


    【解决方案1】:

    我可以通过NSRunningApplication 完成。

    [[NSRunningApplication runningApplicationWithProcessIdentifier:pid] executableArchitecture]
    

    返回Mach-O architecture constant。

    这仅适用于 GUI 应用程序,不过...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      • 1970-01-01
      • 2012-01-25
      • 1970-01-01
      • 2010-12-29
      相关资源
      最近更新 更多