Skip to content
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

NamedPipeServerStream conflict when restarting as an administrator #414

Closed
Eta0 opened this issue Mar 17, 2024 · 0 comments
Closed

NamedPipeServerStream conflict when restarting as an administrator #414

Eta0 opened this issue Mar 17, 2024 · 0 comments

Comments

@Eta0
Copy link
Contributor

Eta0 commented Mar 17, 2024

Since commit 07b56bf fixing #396, relaunching the application as an administrator from the in-app prompt can crash with System.IO.IOException: All pipe instances are busy.

This happens because the construction of the NamedPipeServerStream in Application.xaml.vb is implicitly unique, so the new process will error out if it attempts to create its own before the old process closes its original one.

I tried a hacky workaround of constructing the named pipe server with maxNumberOfServerInstances = 2 and that prevents the crash, but I figure the named pipe should probably be cleaned up before the application-wide mutex is released (and before the subprocess starts), instead, to prevent unexpectedly sharing it for a brief moment before shutdown.

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

No branches or pull requests

1 participant