Sign in Join
FPDoc Onlineexperiment

FpGetpid function

In unit BaseUnix

Return current process ID.

Declaration

pascal
function FpGetpid: TPid

Description

FpGetpid returns the process ID of the currently running process.

Note: There exist a portable alternative to fpGetpid: system.GetProcessID. Please use fpGetpid only if you are writing Unix specific code. System.GetProcessID will work on all operating systems.

Errors

None.

See also

Example: ex16

pascal
Program Example16;

{ Program to demonstrate the GetPid, GetPPid function. }

Uses BaseUnix;

begin
  Writeln ('Process Id = ',fpgetpid,' Parent process Id = ',fpgetppid);
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.