貌似是最新的版本里面 app/process/Monitor.php 增加的 getMasterPid 函数,在 macOS 下始终返回 0 导致的。
$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;
}
创建的默认项目,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
你的mac好新,我还在用11.7.10版本。。。
黑苹果停留在13.x养老了。
https://github.com/walkor/webman/blob/master/app/process/Monitor.php
手动更新下这个文件
谢谢 walkor,我好像记得你也是 macOS 啊,可能你更新过以后没使用过新建的项目吧。
我现在用windows
https://www.workerman.net/q/14153 跟我一样,我自己改了
我也一样啊 热更新没用