adhocteam / pushup

Pushup is for making modern, page-oriented web apps in Go
https://pushup.adhoc.dev
MIT License
844 stars 30 forks source link

Fix child process handling/cleanup #108

Closed paulsmith closed 1 year ago

paulsmith commented 1 year ago

I observed that the full e2e tests (TestPushup) were hanging on my Mac, while the same Git checkout worked fine on a Linux vm.

I dumped the stack trace of all the goroutines and saw that one was blocked waiting for a child process (Cmd type in os/exec) to exit.

So somehow the combo of signal handling and context cancellation wasn't correct, at least for macOS.

Pushup uses a lot of child processes, because e2e tests fire up a full Pushup app and the hot-reloading mode -dev does as well. So it's important to get right.

This PR simplifies things and should make signal handling and context cancellation (and therefore managing of shutdowns and whatnot of child processes) more robust.

llimllib commented 1 year ago

Probably related to #38

llimllib commented 1 year ago

confirmed that the tests pass for me on mac on this branch