← All docs

pcntl_fork()

Forks the current process and returns the child or parent process identifier.

pcntl_fork()

function pcntl_fork(): int

Forks the current process and returns the child or parent process identifier.

Parameters: none.

Returns: int

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how pcntl_fork is implemented in the compiler, see the internals page.