Skip to content

Commit

Permalink
Force the processId to int (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Apr 11, 2022
1 parent a6ac540 commit c08cff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Swoole/ServerProcessInspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function reloadServer(): void
'masterProcessId' => $masterProcessId,
] = $this->serverStateFile->read();

$this->dispatcher->signal($masterProcessId, SIGUSR1);
$this->dispatcher->signal((int) $masterProcessId, SIGUSR1);
}

/**
Expand All @@ -59,7 +59,7 @@ public function stopServer(): bool
$workerProcessIds = $this->exec->run('pgrep -P '.$managerProcessId);

foreach ([$masterProcessId, $managerProcessId, ...$workerProcessIds] as $processId) {
$this->dispatcher->signal($processId, SIGKILL);
$this->dispatcher->signal((int) $processId, SIGKILL);
}

return true;
Expand Down

0 comments on commit c08cff9

Please sign in to comment.