Skip to content

Commit f395e2e

Browse files
committed
Fixed empty pid file
Signed-off-by: XieBiao <[email protected]>
1 parent 1d5e46e commit f395e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/LaravelSCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function start()
103103

104104
if (file_exists($svrConf['swoole']['pid_file'])) {
105105
$pid = (int)file_get_contents($svrConf['swoole']['pid_file']);
106-
if ($this->killProcess($pid, 0)) {
106+
if ($pid > 0 && $this->killProcess($pid, 0)) {
107107
$this->warn(sprintf('LaravelS: PID[%s] is already running at %s:%s.', $pid, $svrConf['listen_ip'], $svrConf['listen_port']));
108108
return;
109109
}

0 commit comments

Comments
 (0)