posix_getpid
laravel/octane
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the current process identifier
posix_getpid
():
int
public function
__invoke
(
$server
,
int $workerId
)
{
$this
->
workerState
->
workerId
=
$workerId
;
$this
->
workerState
->
workerPid
=
posix_getpid
();
$this
->
workerState
->
worker
=
$this
->
bootWorker
(
$server
);
$this
->
dispatchServerTickTaskEverySecond
(
$server
);
src/Swoole/Handlers/OnWorkerStart.php