Problem
tokentracker serve --port N (and PORT=N) treated an occupied port as something to clear by force. ensurePortFree() ran lsof -ti tcp:N, sent SIGTERM to every PID returned, waited ~3s, then SIGKILLed any survivor.
Nothing verified that the victim was a TokenTracker process. Any unrelated program holding that port — a dev server, a database tunnel, another app — was terminated because the user asked TokenTracker to use that number.
Expected
Requesting a busy port should fail and say so. Freeing the port is the user's decision, not a side effect of a start command.
Scope
- Default (non-explicit) startup keeps walking to the next free port — unchanged.
- Explicit
--port / $env:PORT now fails with the alternative command printed.
- Windows had no working path here anyway:
lsof does not exist there, so the kill logic silently no-opped while the docs implied cleanup happened.
Problem
tokentracker serve --port N(andPORT=N) treated an occupied port as something to clear by force.ensurePortFree()ranlsof -ti tcp:N, sentSIGTERMto every PID returned, waited ~3s, thenSIGKILLed any survivor.Nothing verified that the victim was a TokenTracker process. Any unrelated program holding that port — a dev server, a database tunnel, another app — was terminated because the user asked TokenTracker to use that number.
Expected
Requesting a busy port should fail and say so. Freeing the port is the user's decision, not a side effect of a start command.
Scope
--port/$env:PORTnow fails with the alternative command printed.lsofdoes not exist there, so the kill logic silently no-opped while the docs implied cleanup happened.