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

No using asyncIO or Overlapped Results. #38

Open
boostchicken opened this issue Jul 27, 2023 · 3 comments
Open

No using asyncIO or Overlapped Results. #38

boostchicken opened this issue Jul 27, 2023 · 3 comments

Comments

@boostchicken
Copy link

boostchicken commented Jul 27, 2023

https://github.com/boostchicken/wsl2-gpg-ssh-agent/blob/407c5280abf6864e59df3f4d63e910e299951609/main.go#L338-L364

https://github.com/boostchicken/wsl2-gpg-ssh-agent/blob/main/overlapped.go

This is why you are seeing some issues with multiple processes not using pipes correctly I double chechekd go-wino's code and they still don't use it where it's needed or make use of events which really lowers processing overhead (my code does this)

also why not use a vsock in SOCAT, safer, faster, support in Go for it. Just connect a vsock right to your namedpipe.

That we repo is mine and I have been using it for a while. Feel free to steal anything you want.

@boostchicken
Copy link
Author

https://learn.microsoft.com/en-us/windows/win32/devio/overlapped-operations

If you are sstill curious. There is also service creation code in there, code to set env vars.

@masahide
Copy link
Owner

I didn't know about vsock. Thank you. I will try various experiments.

@masahide masahide reopened this Jul 29, 2023
@masahide
Copy link
Owner

https://github.com/nbdd0121/wsld/blob/master/docs/impl.md#finding-the-vm

WSL utility VM is not a regular Hyper-V VM. It will not show up in Hyper-V Manager, and normal Hyper-V API and commands do not apply to the WSL VM. Integration service that listens on wildcard VMID will not accept connections from WSL VM.
The only way around is to retrieve WSL VM's VMID and listen on that specific address. User can use hcsdiag list to obtain the VMID, while we use a semi-documented API called HcsEnumerateComputeSystems to obtain the VMID. Both methods require administrator privilege.

This might be a bit tricky...

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

2 participants