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

(#725) Wait for child processes to complete #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dekalinowski
Copy link

@dekalinowski dekalinowski commented May 6, 2016

Closes #725

Fix for installers which exit immediately, and spawn lingering child
processes, which may carry on additional installation tasks.

Solution first queries for child processes whose parent process ID
matches the installer process. Then, recursively queries for other
active processes related to those children. Finally, wait for each
process to exit.

Fix for installers which exit immediately, and spawn lingering child
processes, which may carry on additional installation tasks.

Solution first queries for child processes whose parent process ID
matches the installer process. Then, recursively queries for other
active processes related to those children. Finally, wait for each
process to exit.

Write-Debug "Searching for any active children to process ($($Id))"

$children = Get-WmiObject -Class Win32_Process -Filter "ParentProcessID=$($Id)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Is there any issues with using this? I would almost want to wrap this in a try catch, so that if it fails it doesn't cause any issues.

@ferventcoder
Copy link
Member

ping @dekalinowski

@dekalinowski
Copy link
Author

I receive your ping. I will follow up within the next day on #725

@dekalinowski
Copy link
Author

As reported in #725, I confirm v0.9.10.2 of Chocolatey resolves this original issue. This pull-request is not needed.

@ferventcoder
Copy link
Member

This may still be necessary. Reopening. cc @boyan-kostadinov

@CLAassistant
Copy link

CLAassistant commented Jun 8, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gep13 gep13 changed the title (GH-725) Wait for child processes to complete (#725) Wait for child processes to complete Oct 15, 2021
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.

Wait for child processes to complete (if parent process exited early)
3 participants