When running dynoxide in the background as part of an npm script, something like... dynoxide & sleep 1 && npm run seed && react-router dev - killing the dev server or hitting Ctrl+C leaves dynoxide running. The port stays in use, and the next npm run dev fails with a port conflict.
A couple of reasons:
- The Node.js wrapper uses
spawnSync, which I think blocks the event loop and can't register signal or exit handlers. It prob needs switching to async spawn with signal forwarding and parent exit detection.
- The Rust server only handles SIGINT (Ctrl+C), not SIGTERM.
Workaround: Kill the orphaned process manually before restarting the npm script.
- Unix:
kill $(lsof -ti :8000)
- Windows:
netstat -ano | findstr :8000 then taskkill /PID <pid> /F (i think, maybe an easier PowerShell one-liner...?)
(replace with whatever port you're using, default is 8000)
When running dynoxide in the background as part of an npm script, something like...
dynoxide & sleep 1 && npm run seed && react-router dev- killing the dev server or hitting Ctrl+C leaves dynoxide running. The port stays in use, and the nextnpm run devfails with a port conflict.A couple of reasons:
spawnSync, which I think blocks the event loop and can't register signal or exit handlers. It prob needs switching to asyncspawnwith signal forwarding and parent exit detection.Workaround: Kill the orphaned process manually before restarting the npm script.
kill $(lsof -ti :8000)netstat -ano | findstr :8000thentaskkill /PID <pid> /F(i think, maybe an easier PowerShell one-liner...?)(replace with whatever port you're using, default is 8000)