On Unix, only explicitly terminate the native process if not in background#18215
On Unix, only explicitly terminate the native process if not in background#18215iSazonov merged 8 commits intoPowerShell:masterfrom
Conversation
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Dominik Kaszewski <dakaszewski@gmail.com>
Co-authored-by: Dominik Kaszewski <dakaszewski@gmail.com>
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
3579e1b to
aaaa503
Compare
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
|
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) |
|
/backport to release/v7.2.7 |
|
/backport to release/v7.3.0-rc.1 |
|
@TravisEz13 backporting to release/v7.2.7 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: On Unix, only explicit terminate the native process if not in background
Using index info to reconstruct a base tree...
M src/System.Management.Automation/engine/NativeCommandProcessor.cs
Falling back to patching base and 3-way merge...
Auto-merging src/System.Management.Automation/engine/NativeCommandProcessor.cs
CONFLICT (content): Merge conflict in src/System.Management.Automation/engine/NativeCommandProcessor.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 On Unix, only explicit terminate the native process if not in background
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
🎉 Handy links: |
PR Summary
A change was introduced in 7.2-preview.6 to explicitly terminate unix processes so they weren't orphaned, however, it killed all processes including ones that should be running in the background. The fix is to check to make sure the process isn't in the background before performing the cleanup.
PR Context
Fix #18181
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.(which runs in a different PS Host).