Skip to content

Commit 070eb73

Browse files
add msgs
1 parent 2d9c7f6 commit 070eb73

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Microstack.Daemon.WindowsService/MicroStackListner.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,25 @@ public override Task StartAsync(CancellationToken cancellationToken)
2525
}
2626
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
2727
{
28+
//var ps = new PipeSecurity();
29+
//var sid = new System.Security.Principal.SecurityIdentifier(System.Security.Principal.WellKnownSidType.WorldSid, null);
30+
//var par = new PipeAccessRule(sid, PipeAccessRights.ReadWrite, System.Security.AccessControl.AccessControlType.Allow);
31+
//ps.AddAccessRule(par);
2832
while (!stoppingToken.IsCancellationRequested)
2933
{
3034
var p = Process.GetProcessesByName("microstack");
3135
using (var pipe = new NamedPipeServerStream("microstack_pipe", PipeDirection.InOut, 5,
3236
PipeTransmissionMode.Byte, PipeOptions.Asynchronous))
33-
{
37+
{
3438
var managedThread = Thread.CurrentThread.ManagedThreadId;
39+
Console.WriteLine($"Managed thread {managedThread}");
3540
try
3641
{
3742
await pipe.WaitForConnectionAsync(stoppingToken);
3843
}
3944
catch (Exception ex)
4045
{
41-
46+
Console.WriteLine(ex.Message);
4247
}
4348

4449
Console.WriteLine("Connected");

0 commit comments

Comments
 (0)