Title: Allow Wait-Process to wait for *any one* of multiple processes, as an opt-in alternative to waiting for *all* of them · Issue #16972 · PowerShell/PowerShell · GitHub
Open Graph Title: Allow Wait-Process to wait for *any one* of multiple processes, as an opt-in alternative to waiting for *all* of them · Issue #16972 · PowerShell/PowerShell
X Title: Allow Wait-Process to wait for *any one* of multiple processes, as an opt-in alternative to waiting for *all* of them · Issue #16972 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement Passing multiple processes to Wait-Process currently makes the latter wait for all target processes. However, it is sometimes desirable to only wait for any one of these processes to terminate. Pr...
Open Graph Description: Summary of the new feature / enhancement Passing multiple processes to Wait-Process currently makes the latter wait for all target processes. However, it is sometimes desirable to only wait for any...
X Description: Summary of the new feature / enhancement Passing multiple processes to Wait-Process currently makes the latter wait for all target processes. However, it is sometimes desirable to only wait for any...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/16972
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow Wait-Process to wait for *any one* of multiple processes, as an opt-in alternative to waiting for *all* of them","articleBody":"### Summary of the new feature / enhancement\r\n\r\nPassing multiple processes to `Wait-Process` currently makes the latter wait for _all_ target processes.\r\n\r\nHowever, it is sometimes desirable to only wait for _any one_ of these processes to terminate.\r\n\r\n\r\n\r\n### Proposed technical implementation details (optional)\r\n\r\n* Introduce an `-Any` switch that makes `Wait-Process` return as soon as any _one_ of the target processes terminates.\r\n\r\n* Complement it with a `-PassThru` switch to pass a process-info object(s) for the terminated process(es) through - this should work whether or not `-Any` is used.\r\n\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2022-03-07T21:26:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/16972/PowerShell/issues/16972"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:75028ab2-de02-f6da-78e5-3215d077bfa2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9124:3B609C:3C70E4:52EAC1:6A551B79 |
| html-safe-nonce | ffeae1a35399553e4c80d43ab3b1c6051c7d9382630aecb9322e9c8ed576ec10 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTI0OjNCNjA5QzozQzcwRTQ6NTJFQUMxOjZBNTUxQjc5IiwidmlzaXRvcl9pZCI6IjEyMTEyMjU1NDU3MDAwODg2OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f5e2a5bf4f5b735ef2873cb23f095eafc65812d8ab36115737a4aa487f7c7551 |
| hovercard-subject-tag | issue:1161942403 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/16972/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3a5cab2b1caaf0b5510a4f43f96a168a3cdbaaffe3e53452a4feabb1deaf9857/PowerShell/PowerShell/issues/16972 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3a5cab2b1caaf0b5510a4f43f96a168a3cdbaaffe3e53452a4feabb1deaf9857/PowerShell/PowerShell/issues/16972 |
| og:image:alt | Summary of the new feature / enhancement Passing multiple processes to Wait-Process currently makes the latter wait for all target processes. However, it is sometimes desirable to only wait for any... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width