Skip to content

Alternative: Stream cleanup only (no timeout mechanism) #1042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

felixweinberger
Copy link
Contributor

Summary

  • PR Fix hanging on streams when stdio_client exiting #559 stream cleanup alone prevents hanging in all tested scenarios
  • Timeout mechanism may be unnecessary complexity
  • All existing timeout tests pass with this simpler approach
  • Preserves Unix behavior while eliminating platform-specific logic

@felixweinberger felixweinberger force-pushed the fweinberger/stream-cleanup-only-approach branch from 5c54ee0 to 23c22ae Compare June 26, 2025 18:51
This change demonstrates a simpler approach than PR #555's timeout mechanism:

1. **Evidence**: Extensive testing shows PR #559 stream cleanup alone prevents
   hanging, even with servers that ignore SIGTERM and keep streams open.

2. **Simplification**: Removes all timeout logic and Windows-specific termination
   function in favor of unified `process.terminate()` + stream cleanup.

3. **Benefits**:
   - Less code complexity (no timeout handling, no platform branching)
   - Preserves proven stream cleanup protection from PR #559
   - Makes behavior consistent across all platforms
   - All existing timeout tests still pass

4. **Risk reduction**: Avoids changing process termination semantics while
   maintaining hanging protection through stream cleanup.

The core insight: process hanging was caused by stream management issues
(solved by PR #559), not termination timing issues (targeted by PR #555).
@felixweinberger felixweinberger force-pushed the fweinberger/stream-cleanup-only-approach branch from 23c22ae to 506879f Compare June 26, 2025 19:04
@felixweinberger felixweinberger deleted the fweinberger/stream-cleanup-only-approach branch June 26, 2025 19:13
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