Closed gcurtis closed 2 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Hey @F1bonacc1, this is something we ran into when running devbox services up
(which runs the process-compose TUI) in the VS Code terminal. Let me know if this fix makes sense. It seems to eliminate the race, but it's also a bit tricky to test.
When the user closes their terminal (as opposed to ctrl-c), the terminal might close the tty without waiting for process-compose to exit. This causes
pcv.appView.Run
to return an error, which triggers alog.Fatal
:This leads to a race where
log.Fatal
might callos.Exit
before the project's processes can be stopped, leaving them orphaned.Change
log.Fatal
tolog.Error
and explicitly shutdown the project to make sure processes aren't left behind.