Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix child process handling/cleanup #108

Merged
merged 4 commits into from
Feb 15, 2023
Merged

Fix child process handling/cleanup #108

merged 4 commits into from
Feb 15, 2023

Conversation

paulsmith
Copy link
Contributor

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.

paulsmith and others added 4 commits February 13, 2023 16:07
This has not been very robust across OSes (macOS and Linux) and
use-cases (tests and interactive running). It was kind of complicated
and confusing, so streamline a bit.
@llimllib
Copy link
Contributor

Probably related to #38

@llimllib
Copy link
Contributor

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

@paulsmith paulsmith merged commit 9e44567 into main Feb 15, 2023
@paulsmith paulsmith deleted the child-proc-cleanup branch February 15, 2023 03:07
paulsmith added a commit that referenced this pull request Feb 15, 2023
This change simplifies child process handling and cleanup, which should make tests and hot-reloading most robust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants