[Overview][Constants][Types][Procedures and functions] Reference for unit 'BaseUnix' (#rtl)

FpFork

Create child process

Declaration

Source position: bunxh.inc line 59

function FpFork: TPid;

Description

FpForkcreates a child process which is a copy of the parent process. FpForkreturns the process ID in the parent process, and zero in the child's process. (you can get the parent's PID with fpGetPPid).

Errors

On error, -1 is returned to the parent, and no child is created.

sys_eagain
Not enough memory to create child process.

See also

fpExecve

  

Execute process using environment

#rtl.linux.Clone

  

Clone current process (create new thread)