-
Notifications
You must be signed in to change notification settings - Fork 903
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
base: master
Are you sure you want to change the base?
(#725) Wait for child processes to complete #726
Conversation
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)" |
There was a problem hiding this comment.
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.
ping @dekalinowski |
I receive your ping. I will follow up within the next day on #725 |
As reported in #725, I confirm v0.9.10.2 of Chocolatey resolves this original issue. This pull-request is not needed. |
This may still be necessary. Reopening. cc @boyan-kostadinov |
|
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.