Files
bun.sh/test/cli
Claude Bot 48afc83936 fix: Make autokill functionality work on Linux and improve tests
This commit fixes the autokill flag implementation and tests to work
properly on Linux systems:

## Changes Made

### autokill.zig
- Fixed deprecated `std.mem.tokenize` usage by replacing with `std.mem.tokenizeAny`
- Improved `killProcessTreeRecursive` to kill parent first to prevent race conditions
- Added better error handling to prevent infinite loops
- Added validation for pid <= 0 to avoid invalid process operations

### autokill.test.ts
- Completely rewrote tests using proper test harness patterns
- Used `Bun.spawn` with `await using` pattern and `bunEnv` for consistency
- Created focused, reliable tests that don't have timing issues
- Added comprehensive test coverage:
  - Basic autokill flag functionality
  - Child process killing verification
  - Comparison with non-autokill behavior
  - Nested process handling

## Testing
All tests now pass reliably on Linux. The autokill functionality works
correctly for both direct children and nested process trees.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 04:42:49 +00:00
..
2025-05-24 13:36:51 -07:00
2025-05-16 23:40:56 -07:00