@openagents-org/agent-connector 0.1.2 → 0.1.3
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/package.json +1 -1
- package/src/config.js +4 -2
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -139,8 +139,10 @@ class Config {
|
|
|
139
139
|
try {
|
|
140
140
|
process.kill(pid, 0);
|
|
141
141
|
return pid;
|
|
142
|
-
} catch {
|
|
143
|
-
//
|
|
142
|
+
} catch (e) {
|
|
143
|
+
// EPERM means the process exists but we lack permission (cross-session on Windows)
|
|
144
|
+
if (e.code === 'EPERM') return pid;
|
|
145
|
+
// ESRCH means no such process — stale PID file
|
|
144
146
|
try { fs.unlinkSync(this.pidFile); } catch {}
|
|
145
147
|
return null;
|
|
146
148
|
}
|