NSRunningApplication.h: "Not all applications have a pid" NSRunningApplication.h: "Not all applications have a pid" unix unix

NSRunningApplication.h: "Not all applications have a pid"


It's a hedge. A "running application" is something that the user thinks of as an application. Shows up in the cmd-tab switcher, etc. That need not necessarily correspond directly to a process. In the classic environment, multiple applications were hosted by a single unix process, classic. In this situation NSRunningApplication would return -1 for each "application".

People who had been at it long enough had seen enough interesting hacks that they thought this was an important thing to define.