Skip to content

Ensure NamedPipeServerStream is assigned in Windows PowerShell #955

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

Merged
merged 2 commits into from
May 15, 2019

Conversation

rjmholt
Copy link
Contributor

@rjmholt rjmholt commented May 14, 2019

Fixes #954.

There was a small missing assignment in the startup under the .NET Framework branch.

WIP because I'm going to make some style changes :)

Merging this will also make #944 pass its Windows PS test!

@rjmholt rjmholt requested review from TylerLeonhardt, SeeminglyScience and rkeithhill and removed request for TylerLeonhardt May 14, 2019 22:59
@rjmholt rjmholt changed the title Ensure NamedPipeServerStream is assigned in Windows PowerShell WIP: Ensure NamedPipeServerStream is assigned in Windows PowerShell May 14, 2019
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just remove the usings

@@ -13,7 +13,9 @@
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Threading;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete?

using System.Threading.Tasks;
using System.Diagnostics;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete?

@TylerLeonhardt
Copy link
Member

I can't believe I forgot to make that assignment 🤦‍♂️

@rjmholt rjmholt changed the title WIP: Ensure NamedPipeServerStream is assigned in Windows PowerShell Ensure NamedPipeServerStream is assigned in Windows PowerShell May 15, 2019
@@ -20,28 +20,29 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel
public class NamedPipeServerListener : ServerListenerBase<NamedPipeServerChannel>
{
// This int will be casted to a PipeOptions enum that only exists in .NET Core 2.1 and up which is why it's not available to us in .NET Standard.
private const int CurrentUserOnly = 536870912;
private const int CurrentUserOnly = 0x20000000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol that explains the weird decimal number

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjmholt rjmholt merged commit 51909ee into PowerShell:master May 15, 2019
@rjmholt rjmholt deleted the namedpipe-assign-winps branch December 11, 2019 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception: An unhandled exception occurred while listening for a named pipe client connection
3 participants