貌似是最新的版本里面 app/process/Monitor.php 增加的 getMasterPid 函數(shù),在 macOS 下始終返回 0 導(dǎo)致的。
$cmdline = "/proc/$this->ppid/cmdline";
if (!is_readable($cmdline) || !($content = file_get_contents($cmdline)) || (!str_contains($content, 'WorkerMan') && !str_contains($content, 'php'))) {
// Process not exist
$this->ppid = 0;
}
創(chuàng)建的默認(rèn)項(xiàng)目,composer create-project workerman/webman:~2.0
php start.php start
修改代碼后,熱更新無效。
composer create-project workerman/webman:~2.0
macOS 15.4
webman 2.1.3