Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow Wait-Process to wait for *any one* of multiple processes, as an opt-in alternative to waiting for *all* of them #16972

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

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.

Proposed technical implementation details (optional)

  • Introduce an -Any switch that makes Wait-Process return as soon as any one of the target processes terminates.

  • 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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.