Skip to content

fix(sdk): ignore retryable reads on the supervised owner pipe - #184

Open
yashranaway wants to merge 2 commits into
mainfrom
fix/supervised-owner-eagain
Open

fix(sdk): ignore retryable reads on the supervised owner pipe#184
yashranaway wants to merge 2 commits into
mainfrom
fix/supervised-owner-eagain

Conversation

@yashranaway

Copy link
Copy Markdown
Collaborator

What this changes

start --supervised watches the owner pipe and shuts the host down on EOF. The old condition was count >= 0 || errno != EINTR, so a DispatchSource or poll wakeup that returned EAGAIN/EWOULDBLOCK also stopped a live host.

That is the kind of false owner-exit that leaves Chromium with a closed DevTools pipe.

EOF and unexpected data still stop the host. EINTR, EAGAIN, and EWOULDBLOCK do not. The CLI wait loop uses the same helper.

Verification

Protocol test covers EOF, data, EINTR, EAGAIN, EWOULDBLOCK, and EBADF.

Security

No transport, JS, or credential change. Supervised hosts still stop when the owner pipe actually closes.

DispatchSource and poll can wake with EAGAIN. Treating that as owner
exit killed a live supervised host. EOF and real errors still stop it.
macOS 3.14 CI spent 530 ms on a 400 ms budget plus process overhead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant