Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Sub-process: Do not reuse port in child process #820

Closed
karthiknadig opened this issue Sep 19, 2018 · 3 comments
Closed

Sub-process: Do not reuse port in child process #820

karthiknadig opened this issue Sep 19, 2018 · 3 comments

Comments

@karthiknadig
Copy link
Member

Currently we allow re-use of ports in ptvsd by default. we should add a switch that turns off this feature.

@int19h
Copy link
Contributor

int19h commented Sep 19, 2018

We will still need to use the option to avoid crashing processes hogging up the port. But it looks like it's all more complicated than just allowing reuse, and also varies by platform.

https://docs.microsoft.com/en-us/windows/desktop/winsock/using-so-reuseaddr-and-so-exclusiveaddruse

https://stackoverflow.com/a/14388707/111335

@karthiknadig
Copy link
Member Author

Let us use this work item to add the option to fail on address reuse. I will create another work item to refactor and properly set reuse for all supported platforms.

@karthiknadig
Copy link
Member Author

This was a issue specific to windows. We decided to use SO_EXCLUSIVEADDRUSE on windows to fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants