diff options
| author | Jesse Vincent <jesse@fsck.com> | 2026-03-24 11:46:29 -0700 |
|---|---|---|
| committer | Jesse Vincent <jesse@fsck.com> | 2026-03-24 11:46:29 -0700 |
| commit | 738a18d6ff47be822cfd2e81ace56b3287814dd4 (patch) | |
| tree | abd16a9b5eca9628d34aecdf20c5a4975d83b24a /tests/opencode | |
| parent | 94b2bcbb24399a200183723ad461ac0f25e521ab (diff) | |
Fix owner-PID false positive when owner runs as different user
ownerAlive() treated EPERM (permission denied) the same as ESRCH
(process not found), causing the server to self-terminate within 60s
whenever the owner process ran as a different user. This affected WSL
(owner is a Windows process), Tailscale SSH, and any cross-user
scenario.
The fix: `return e.code === 'EPERM'` — if we get permission denied,
the process is alive; we just can't signal it.
Tested on Linux via Tailscale SSH with a root-owned grandparent PID:
- Server survives past the 60s lifecycle check (EPERM = alive)
- Server still shuts down when owner genuinely dies (ESRCH = dead)
Fixes #879
Diffstat (limited to 'tests/opencode')
0 files changed, 0 insertions, 0 deletions
