[Yes - I know - ancient history, but I ran into the issue today and as I have more info...]
ProcessSerialNumber
Defines the unique identifier for an open process.
struct ProcessSerialNumber {
unsigned long highLongOfPSN;
unsigned long lowLongOfPSN;
};
typedef struct ProcessSerialNumber ProcessSerialNumber;
typedef ProcessSerialNumber * ProcessSerialNumberPtr;
Field Descriptions
highLongOfPSN
The high-order long integer of the process serial number.
lowLongOfPSN
The low-order long integer of the process serial number.
Discussion
You should not make any assumptions about the meaning of the bits in a process serial number. To compare two process serial numbers, you should use the function SameProcess.
You can obtain a process serial number in one of the following ways:
Process serial numbers are returned by the functions LaunchApplication, GetCurrentProcess, and GetFrontProcess.
Some high-level events return process serial numbers.
I was trying to open a test text file (text.xyz) with my SimpleEditor application by double-clicking on the file which I'd uploaded to a web server and then downloaded again. The original would open, but the downloaded copy returned the infamous "Cannot open file: -psm_0_xxxxxx" message. This was resolved with:
xattr -d com.apple.quarantine test.xyz
So, that what psm stands for and what caused it in this instance.