You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance bin/dev kill to terminate processes on ports 3000 and 3001
Previously, `bin/dev kill` only terminated processes by pattern matching
(e.g., "rails", "puma", "webpack-dev-server"). This could miss processes
that were holding ports 3000 or 3001 but didn't match the patterns.
Now `bin/dev kill` also finds and terminates any process listening on
ports 3000 and 3001 using `lsof -ti:PORT`, ensuring a clean restart
even when unexpected processes are blocking the development ports.
Changes:
- Add kill_port_processes(ports) method to find and kill processes on specific ports
- Add find_port_pids(port) helper that uses lsof to find PIDs listening on a port
- Update kill_processes to call kill_port_processes([3000, 3001])
- Add comprehensive tests for port-killing functionality
- Handle edge cases (lsof not found, permission denied) gracefully
The port-killing is integrated as default behavior (no --force flag needed)
since ports 3000/3001 are explicitly development ports and this matches
the existing UX where kill doesn't ask for confirmation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments