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
Remove unused pinvokes in RemoteSessionNamedPipe #18583
Conversation
|
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? |
src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs
Show resolved
Hide resolved
src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs
Show resolved
Hide resolved
src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs
Show resolved
Hide resolved
|
@iSazonov there probably isn't a reason we shouldn't update the code to use .NET abstraction for named pipes on Windows and not use the custom pinvokes at all |
Technically I could do it, but I'm afraid I won't be able to fully test it. Does your team have internal tests for this? |
|
@iSazonov I believe namedpipes are primarily used for debugging PS scripts, so we may need to add more tests for that before considering refactoring the code |
|
@SteveL-MSFT Can you approve? |
|
I believe we are still using Native PInvoke for named pipes on Windows platform in order to set ACLs on the pipes. I don't know if dotNet named pipes now supports this or not, since it is a Windows only function. |
|
Handy links: |
PR Summary
Contributes to #18553.
@SteveL-MSFT @PaulHigin After fast looking NamedPipeServerStream .Net implementation I wonder why do we still use custom code for Windows? Do you know a reason why we can not migrate now and use NamedPipeServerStream directly as for Unix?
PR Context
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).