← All docs

pcntl_setns()

Joins one Linux namespace of the selected process.

pcntl_setns()

function pcntl_setns(int $process_id = null, int $nstype = 1073741824): bool

Joins one Linux namespace of the selected process.

Parameters:

  • $process_id (int), default null, optional
  • $nstype (int), default 1073741824, optional

Returns: bool

Availability

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

Internals

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