@jkwd/inbase 0.1.22 → 0.1.23
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/bin/project.mjs +5 -3
- package/package.json +1 -1
package/bin/project.mjs
CHANGED
|
@@ -55,13 +55,15 @@ export function resolveOptionalPath(value, fallback) {
|
|
|
55
55
|
|
|
56
56
|
export const INSTANCE_FILE = 'instance.json'
|
|
57
57
|
|
|
58
|
-
function isPidAlive(pid) {
|
|
58
|
+
export function isPidAlive(pid) {
|
|
59
59
|
if (!Number.isInteger(pid)) return true
|
|
60
60
|
try {
|
|
61
61
|
process.kill(pid, 0)
|
|
62
62
|
return true
|
|
63
|
-
} catch {
|
|
64
|
-
|
|
63
|
+
} catch (error) {
|
|
64
|
+
// Cursor's agent sandbox cannot signal other processes (EPERM) even when
|
|
65
|
+
// they are alive. POSIX EPERM means the pid exists; only ESRCH is gone.
|
|
66
|
+
return error?.code === 'EPERM'
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
|