GetPID

Demonstrates how to return the process ID of the currently running process.

Remarks

This example returns the process id of the current running process.

The GetPID() intrinsic returns -1 if it fails, the process id otherwise.

Code

 local int pid
 pid = GetPID()

 print "PID = ", pid

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.