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

run-e2e.mjs and run-bidi-server.mjs should kill child process on exit #2453

Closed
OrKoN opened this issue Jul 30, 2024 · 1 comment · Fixed by #2496
Closed

run-e2e.mjs and run-bidi-server.mjs should kill child process on exit #2453

OrKoN opened this issue Jul 30, 2024 · 1 comment · Fixed by #2496
Labels
bug Something isn't working P3

Comments

@OrKoN
Copy link
Collaborator

OrKoN commented Jul 30, 2024

the code to achieve this can be found in https://github.com/puppeteer/puppeteer and, for example, on Linux it involves calling the kill with the group id:

          // on linux the process group can be killed with the group id prefixed with
          // a minus sign. The process group id is the group leader's pid.
          const processGroupId = -this.#browserProcess.pid;
          process.kill(processGroupId, 'SIGKILL');

as the fallback the node child_process kill API can be used.

Currently, you can reproduce the issue by running chromedriver e2e and checking the matchLine to always error. This results in a dangling chromedriver process that can only be killed manually.

cc @Lightning00Blade @sadym-chromium

@OrKoN OrKoN added the bug Something isn't working label Jul 30, 2024
@OrKoN
Copy link
Collaborator Author

OrKoN commented Jul 30, 2024

I think in general it might be OS-specific but I do not think Node will try to auto-kill child processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant