@aiyiran/myclaw 1.1.69 → 1.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gateway.js +3 -1
- package/package.json +1 -1
package/gateway.js
CHANGED
|
@@ -74,10 +74,12 @@ function stop() {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// 2b. 杀所有 openclaw 相关进程(防止僵尸进程)
|
|
77
|
+
// 注意:用精确匹配,避免误杀路径中含 "openclaw" 的无关进程(如 Antigravity 等)
|
|
77
78
|
try {
|
|
78
79
|
if (!isWin) {
|
|
79
80
|
const myPid = process.pid;
|
|
80
|
-
|
|
81
|
+
// pgrep -x 只匹配进程名本身;pgrep -f 的精确模式匹配 "openclaw gateway" 子命令
|
|
82
|
+
const procs = execSync('{ pgrep -x openclaw; pgrep -f "openclaw gateway"; } 2>/dev/null | sort -u || true', {
|
|
81
83
|
encoding: 'utf8', stdio: 'pipe', timeout: 5000
|
|
82
84
|
}).trim();
|
|
83
85
|
if (procs) {
|