Skip to content

Dev#228

Merged
Alice-space merged 2 commits into
mainfrom
dev
May 14, 2026
Merged

Dev#228
Alice-space merged 2 commits into
mainfrom
dev

Conversation

@Alice-space
Copy link
Copy Markdown
Owner

Summary

Checklist

  • make check passes locally
  • Documentation updated in book/ (both en/ and zh/ if applicable)
  • README / README.zh-CN updated if user-visible behavior changed
  • Tests added or updated
  • No sensitive data in logs or comments

Related Issues

Alice-space and others added 2 commits May 14, 2026 18:09
…tdown

Introduce shared.WaitOrKill() that escalates gracefully: wait for natural
exit after stdin close → SIGTERM → SIGKILL, each with a 10s grace period.
Replace all direct Kill()+Wait() calls across claude_stream_driver,
jsonrpc_line_client, and opencode_appserver_driver.

Also fix a nil-Process bug in jsonrpc_line_client.Close() that would
call cmd.Wait() on a never-started command.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
resetServerForNextRequest was holding d.mu while calling WaitOrKill
which can block up to 20s. Release the lock before waiting so new
requests are not blocked.

Change SubprocessGracePeriod/SubprocessTermGracePeriod from const to var
for testability, and add unit tests covering normal exit, non-zero exit,
already-exited, SIGTERM escalation, and SIGTERM acceptance.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Alice-space Alice-space merged commit 9bf1b46 into main May 14, 2026
5 checks passed
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