[Next] [Up] [Previous]
Next: Nice Up: Functions and procedures Previous: Execl

Fork

   

Declaration:

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, fork(2)



Michael Van Canneyt
Thu Dec 12 15:40:07 MET 1996