Skip to content

fix: handle SIGHUP from OpenSSH #10638

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

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Nov 13, 2023

Fixes an issue where remote forwards are not correctly torn down when using OpenSSH with coder ssh --stdio. OpenSSH sends a disconnect signal, but then also sends SIGHUP to coder. Previously, we just exited when we got SIGHUP, and this raced against properly disconnecting.

Fixes https://github.com/coder/customers/issues/327

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@spikecurtis spikecurtis force-pushed the spike/customer-327-ssh-testing branch from 5c48787 to 5732ab8 Compare November 13, 2023 07:40
@spikecurtis spikecurtis force-pushed the spike/customer-327-ssh-testing branch 3 times, most recently from dc53c53 to f8a1944 Compare November 13, 2023 09:05
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@spikecurtis spikecurtis force-pushed the spike/customer-327-ssh-testing branch 2 times, most recently from 0d7aa0c to d727342 Compare November 13, 2023 10:04
Copy link
Contributor Author

I fixed up a race in this test, so would appreciate another quick pass over ssh_test.go @johnstcn @mafredri

@spikecurtis spikecurtis force-pushed the spike/customer-327-ssh-testing branch from d727342 to 4531089 Compare November 13, 2023 10:07
@spikecurtis spikecurtis merged commit f400d8a into main Nov 13, 2023
@spikecurtis spikecurtis deleted the spike/customer-327-ssh-testing branch November 13, 2023 11:14
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants