-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Wait-Process: add -Any and -PassThru parameters #19423
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
Conversation
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Ilya <darpa@yandex.ru>
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
…nt/Process.cs Preserve old error-writing behavior when -Any isn't used. Co-authored-by: Ilya <darpa@yandex.ru>
iSazonov
left a comment
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.
Formally LGTM.
We need WG review before merge.
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
I have put this issue on the agenda for the next Cmdlete WG meeting. |
|
The WG has reviewed this issue and agree that both parameters would be a useful addition. |
|
@dwtaber Please add tests. |
iSazonov
left a comment
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.
@dwtaber Please open doc issue in https://github.com/MicrosoftDocs/PowerShell-Docs and add reference in the PR description.
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Management/Wait-Process.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Management/Wait-Process.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Management/Wait-Process.Tests.ps1
Outdated
Show resolved
Hide resolved
…rocess.Tests.ps1 Clarified `It` function conditions Co-authored-by: Steve Lee <slee@microsoft.com>
test/powershell/Modules/Microsoft.PowerShell.Management/Wait-Process.Tests.ps1
Show resolved
Hide resolved
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
JamesWTruher
left a comment
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.
provide a comment about the tests and WindowStyle
test/powershell/Modules/Microsoft.PowerShell.Management/Wait-Process.Tests.ps1
Outdated
Show resolved
Hide resolved
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
SteveL-MSFT
left a comment
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.
LGTM
PR Summary
When the
-Anyparameter is used,Wait-Processreturns once one of the specified processes terminates, rather than waiting for all of them.The
-PassThruparameter returnsProcessobjects for all of the specified processes. The original request was for-PassThruto return the terminated processes in particular, but I didn't want to make assumptions about whether a user would be interested in the processes that terminated or the ones that are still running.Neither of these new parameters depends on the other; they work separately or in combination.
PR Context
Resolves #16972
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.Wait-Process: document new-Anyand-PassThruparameters MicrosoftDocs/PowerShell-Docs#10162(which runs in a different PS Host).