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

Fork

Create child process

Declaration

Source position: oldlinux.pp line 1350

function Fork: LongInt;

Description

Fork creates a child process which is a copy of the parent process. Fork returns the process ID in the parent process, and zero in the child's process. (you can get the parent's PID with GetPPid).

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

Execve

  

Execute process using environment

Clone

  

Clone current process (create new thread)

The latest version of this document can be found at lazarus-ccr.sourceforge.net.