← All docs

pcntl_wait()

Waits for any child process and writes its target-native status.

pcntl_wait()

function pcntl_wait(mixed $status, int $flags = 0, mixed $resource_usage = []): int

Waits for any child process and writes its target-native status.

Parameters:

  • $status (mixed), passed by reference
  • $flags (int), default 0, optional
  • $resource_usage (mixed), passed by reference, default [], optional

Returns: int

Availability

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

Internals

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