pcntl_getcpuaffinity

Get the cpu affinity of a process

説明

boolarray pcntl_getcpuaffinity(intnull $pid = null)

Retrieve the cpu affinity of the pid.

パラメータ

pid
If null, the current process ID is used.

戻り値

Returns the cpu affinity mask of the process, 失敗した場合に false を返します.

警告

この関数は論理値 false を返す可能性がありますが、false として評価される値を返す可能性もあります。 詳細については 論理値の セクションを参照してください。この関数の返り値を調べるには ===演算子 を 使用してください。

エラー / 例外

A ValueError is thrown when pid is an invalid process id or the cpu mask had failed to be created.

If pid is a process for which the current user has no allowed permission, a E_WARNING is emitted.

参考

  • pcntl_setcpuaffinity