Wait-Process: add -Any and -PassThru parameters#19423
Wait-Process: add -Any and -PassThru parameters#19423daxian-dbw merged 20 commits intoPowerShell:masterfrom
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.
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.
@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.
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) |
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).