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

conpty handle leak #20

Open
caarlos0 opened this issue Jan 30, 2024 · 0 comments
Open

conpty handle leak #20

caarlos0 opened this issue Jan 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@caarlos0
Copy link
Member

caarlos0 commented Jan 30, 2024

If you run the ssh-allocatepty example on windows, and monitor the open handles by that process, you'll notice that each session leaves ~1 file handle behind.

On linux, everything seems to work fine.

Here's how I'm monitoring this:

linux
# in one shell:
watch -n1 'ls -l /proc/$(pidof ssh-allocatepty)/fd | wc -l'

# in another:
while true; do ssh -p2222 localhost; sleep 1; done
windows
# in one shell:
while(1) { cls; Get-Process | Where-Object {$_.Name -like "ssh-allocatepty"}; sleep 1}

# in another (the first column is the number of Handles open)
while(1) { cls; ssh -p 2222 localhost; sleep 1}
@caarlos0 caarlos0 added the bug Something isn't working label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant