Skip to content

Commit c08cff9

Browse files
authored
Force the processId to int (#507)
1 parent a6ac540 commit c08cff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Swoole/ServerProcessInspector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function reloadServer(): void
4141
'masterProcessId' => $masterProcessId,
4242
] = $this->serverStateFile->read();
4343

44-
$this->dispatcher->signal($masterProcessId, SIGUSR1);
44+
$this->dispatcher->signal((int) $masterProcessId, SIGUSR1);
4545
}
4646

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

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

6565
return true;

0 commit comments

Comments
 (0)