Please enable JavaScript to view this site.

A-Shell Reference

Reviewed April 2024

xcall MIAMEX, MX_GETPID, pid

MX_GETPID (MIAMEX 104) retrieves your current process ID number.

Parameters

pid (Unsigned Int, 32 bits)  [out]

returns your process ID. Note that while the maximum pid varies from one operating system to another, to be safe you should allow for a 32 bit integer.

Comments

A process ID (aka PID) is a positive integer which uniquely identifies a process. They are assigned by the operating system when the process is created, and recovered (for subsequent reuse) when the process terminates. PIDs are most useful in Unix, where they are the most common way to identify or communicate with another process. They are less useful but still valid in the Windows environment.